static void Init() { // Get existing open window or if none, make a new one: _instance = (MapEditorWindow)EditorWindow.GetWindow(typeof(MapEditorWindow)); _instance.titleContent = new GUIContent("Map Editor"); _instance.Show(); }
void OnEnable() { _instance = this; SceneView.onSceneGUIDelegate += OnScene; _data = mapEditor.Data; _showContentColors = new AnimBool(false); _showContentColors.valueChanged.AddListener(Repaint); if (_data != null) { Load(); } }