- Home /
Variables changed on custom editor or custom editor window reset when unity restart,recompile scripts or play the game
I am trying to do a custom tile system for unity then i have a variable like this:
[SerializeField] int[,] map;
i edit this variable on a custom editor window and a custom editor using OnEsceneGUI(), but when i restart unity, recompile scripts or i press "|>" button the values saved on map reset.
How can i fix it?
Editor Script:
Editor Window Script:
Class Script (mobileObject extends from monobehavior):
Please, post your Custom Editor Window / Custom Editor script too.
Answer by JeffHardddyyy · Dec 16, 2016 at 07:17 PM
If you want a script, please put it in the forum post.
' //Like this, there's a button.'
i want to make my own script, i want to solve this problem to continue.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to add a variable to a prebuilt class? 1 Answer
Class Scope Variable 1 Answer
How to pass variables from one object in one scene to another object in another scene? 3 Answers