How do you know that the editor UI is no longer displayed in the inspector?

0 like 0 dislike
4 views
I have a task to save the settings properties of a custom editor.
#define NONTRAIL using UnityEngine; using System.Collections; using UnityEditor; using System; [CustomEditor(typeof(PhotoPoser))] public class PhotoPoserGUI : Editor { private bool run = false; private object[] tab; public override void OnInspectorGUI() { PhotoPoser pp = (PhotoPoser)target; if (run == false) { DataReadWriter.ReadParams (this.GetType().ToString(), out, tab); DataReadWriter.ReadParams (pp.GetType().ToString(), out pp.sizes); run = true; } ...

here variable always run when I turn this editor to false
it helps me to read the data
remains to save when I stop to draw this editor
Advise in what direction to dig.
by | 4 views

1 Answer

0 like 0 dislike
Can try to use OnDisable.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,924 users