- Home /
Question by
KUNGENN · Jun 18, 2017 at 11:24 AM ·
unity 5sorting layers
Changing sorting layers order at runtime
I am making a game with a "white" sorting layer and a "black" sorting layer. I want to make it so when i press a button, everything in the white layer will be rendered on top of the black layer, and when i press again the black layer will be rendered on top. I could make a third layer called white2 and on button press the objects in the white layer would change sorting layer to white2 but i have too many objects and I dont want to do it manually.
In the tags and layers menu you can manually drag and drop the sorting layers in the order you want, but is it possible to do through script?
Comment
Your answer
