- Home /
Changing SpriteRenderer orderInLayer via scripting?
I need to make changes in the z-order of objects. When I change the orderInLayer variable via inspector, all is fine. But sometimes I need to change the layer order. How can I do that?
Comment
Renderer.sortingOrder doesn't seem to work properly. Can I get some more details?
Best Answer
Answer by Mogware · Jan 19, 2014 at 02:03 AM
Renderer.sortingOrder
Found it here: http://forum.unity3d.com/threads/217667-Accessing-quot-Order-in-Layer-quot
Your answer
Follow this Question
Related Questions
Draw a GUIText behind a sprite 1 Answer
Apply a shader to multiple 2D sprites 2 Answers
Unity2D sprites overlapping 2 Answers
2d Collision sprites by changing the layer order ? 0 Answers
GameObject sortingOrder 1 Answer