I’m trying to solve my problem for a two days and i’m getting angry of this already.
So i’m trying to switch between animation using Play(); and Animation component:
(Writing is a defoult animation)
I’m getting following error message:
“The animation state EndOfWriting could not be played because it couldn’t be found!”
I found solving this by changing Animation type from 2 to 1. (change to Legacy, right?) but this made a new problem. When i’m changing animation tyle all my sprites in Animation Tab becoming the same. They are becoming like a first one. Even if i’m import other sprites.
That’s what i’m talking about. Animation is playing but all the sprites are the same.
Helpme solve this problem please! There is my code:
public class S1P : MonoBehaviour {
Animation anim;
public GameObject player;
void Start () {
anim = player.GetComponent<Animation>();
StartCoroutine(sd());
}
IEnumerator sd()
{
yield return new WaitForSeconds(2);
print("sup");
anim.animation.Play("EndOfWriting", PlayMode.StopAll);
}
}