ac1.53,u5.3.6p1
good morning,
I have several sprites I would like to hide or show permanently on my player prefab.
Like a hat for example.
So the hat-sprite is nested somewhere in the sprite unity complex player.
adding the remember visibility script to the hat gives it a constant id.
In the scene I have a action that hides the hat and show the hat.
But this doesn't work. When I remove the player prefab the action looses the reference.
Am I doing something wrong?
I thought I ask before I create animation clips just for showing and hiding sprites.
Comments
However if you're using Sprites Unity Complex, the neater way to accomplish this would be to animate the alpha value / sprite field of the child Sprite objects as part of the Animator component itself, so that you can control their visibility using Mecanim parameters. If you place these animations on a new layer, you can control them separately to the rest of your player's animations.
An Action field will show the referenced object's ID number if it's successfully recorded it. If an object with that number is present in the scene when the Action is run, the Action should then find it - even if the object itself wasn't present in the original scene file.