Hello! I have done some animations with inventory objects and the problem is that in the beginning they are in the **Back **Sorting layer because they start hidden.
But when I do the animation for them I can't change the** Sorting layer,** so objects are hidden by other objects. I need that the turtles will be in front of the chair. I have tried at the timeline and animation window and don't allow me to change sorting layer there. I also try to do with action lists but there is no option to change sorting layer in objects. Also I try to use "Follow sorting map" in the turtles but if I do that turtles don't teleport to their new location.
Help?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Unity doesn't allow for a Sprite Renderer's Sorting Layer to be animated, but you can do it with the help of a custom Action:
Install that as in an Action script named ActionSpriteLayer.cs using the instructions in the Manual's "Custom Actions" chapter, and it should then be available in ActionLists as a new "Object: Set sprite layer" Action.
It worked . Thanks a lot for the code.