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.