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

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