- Home /
Script changes layer order. Unity changes it back on build.
I have a script that runs on click of a menu item. It changes my order in layer of all the objects i want it to. If I run my game right after i use it it works fine and everything stays ordered. If I build the game however to run it standalone somehow all the orders are set back to zero. Even when I specifically save the Project and Scene right after I used my script. Now i made the script run on game launch which also works fine but takes quite a while which is why I wanted to do it in the editor in the first place. Please help me.
P.S. The problem is not just with layerorder. The script also changes a gameobject component so the floor tile knows what is standing on top of it. This is also reset.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Xcode build fails, How to ? 1 Answer
PlayerPrefs not working? 1 Answer
Build problem, missing variables 1 Answer