hi ım trying to make if a spesific animation is playing some code will not be executed but its not working.I want to change the scene when mainmenuchange animation is over
Code (CSharp):
- public void play()
- {
- ımage.SetActive(true);
- GetComponentInChildren<Animator>().Play("mainmenuchange");
- if (!GetComponentInChildren<Animator>().GetCurrentAnimatorStateInfo(0).IsName("mainmenuchange")){
- SceneManager.LoadScene("begin");
- }
- }