Hello, I am trying to change a sprite of a gameObject at runtime using script or event with the Unity editor but it has no effect. Indeed an animator is attached to this gameObject and animation is played at some time. This animation modify the sprite when launched. However, no animation are launched when I am trying to update the sprite (Idle with no animation) but still no luck. Thank you. Matthieu
You have to change the sprites in the animations. Then you define a trigger or bool in the animator and in the Script you call Animator.SetTrigger("yourTriggerName"); Then the animation is changed and the new sprite should appear.