- Home /
change order in layer via animation window?
how can I change order in layer of an object via animation window?in frame 0 I want it's order in layer to be 4 and in frame 10 I want it to be 5,is it possible?because if I change it in a frame ,it will change in all frames.
Did you try changing the Z value? it should bring that layer forward...
hehe, yeah it worked thanks :). if you want you can convert your comment to answer :).
Haha, no need. i guess you figured it out earlier. Just trying to help :p
it worked when I was using sprites,but now I'm animating my character inside unity,I want my character's hand to show in front of his head, but I can't do it even with changing z value nothing is changing.
I used Renderer.sortingOrder = 25; and it worked fine , is there any way that I could do it via animator window?
Hi. I don't really get what you mean. So your character is no longer 2D? $$anonymous$$aybe posting another picture will help us understand what's happening.
Answer by tmalhassan · Oct 08, 2017 at 03:52 PM
So the idea is to have two Hand objects (One under the body and another on top of the body) then open the animator and change the Alpha of the hand game objects so when you want the one on top to appear change it's alpha to 1 and the other hand's alpha to 0.
P.S. In the animator, the alpha property is called Color.a. Also, this will work on both components whether you're using Sprite Renderer or Image.
Hope this helps :)
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Animation Parameters Not Working Correctly 0 Answers
Setting animator parameter on a single instance of a prefab sets the parameter for all instances 3 Answers
2D Animation appears too big on one frame 0 Answers
How to start an animation by the exit animation frame 0 Answers