Hi all.
After 3 hours reading and reading, i post the question.
How can i to hide an sprite im using with animator?
I need to show the animation and hide it with buttons.
I have tried lot of things, but i can’t do this!
How it is posible there is not a anim.show or anim.hide ?
i’m lost
Can anyone help me, please?
Good day.
You have multiple ways to “hide” a image like a sprite.
You can simple Deactivate the gameobject by
gameObject.SetActive(false);
or you can disable the image component of the sprite by
gameObject.GetComponent().enable=false;
or you can move its position outsite of the camera view, or change its Alpha color to be 100% transparent.
Bye!