Question by 
               HarleyFuagras · Dec 21, 2017 at 09:54 AM · 
                guicustom editorguilayout  
              
 
              Keep data on CustomEditor after moving from the GameObject with the editor to another GameObject.
I have a custom editor for a GameObject with a checkbox like this:
 public class GridEditor : Editor {
 private bool activateEditor = true;
 
     public override void OnInspectorGUI()
     {
         activateEditor = EditorGUILayout.Toggle("Activate Editor", activateEditor);
     }
 }
The problem I am facing is that when I change on the Hierarchy window from the GameObject with the editor to any other GameObject and I go back again to the GameObject with the editor, the state of the checkbox is not kept. How can I solve this?
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                