- Home /
Setting different values on editor and build
I have an int variable called ID, and I want to create a game where the ID of the player in the editor equals one, the ID of the player in the build equals 2, the ID of the second build equals 3, and so on...
How can I write a script that changes the ID value everytime a new build is created?
Answer by DawidNorasDev · Jun 19, 2019 at 08:24 AM
What I can think of, that I've done in my previous projects, is to create custom MenuItem which does just that. (Loads scene, changes variable, saves scene) and then starts the build.
From what I can see, $$anonymous$$enuItem is used to mostly change the inspector. How can I use so that the ID variable will automatically increase whenever a new build is created?
Your answer
Follow this Question
Related Questions
Script works differently in build 0 Answers
Build and Editor collisions behaving different? 0 Answers
Distribute terrain in zones 3 Answers
Photon multiplayer game working in editor but not in build. 1 Answer
Unity Scene File in Build Question 1 Answer