public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (GUILayout.Button("Edit"))
     {
         LevelEditorWindow.OpenEditor((Level)Selection.activeObject);
     }
 }
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            var terrain = Selection.activeGameObject.GetComponent <LevelScript>();

            if (GUILayout.Button("Edit"))
            {
                LevelEditorWindow.OpenEditor(terrain.owner);
            }
        }