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

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