public virtual void OnSceneViewGUI(SceneView view, MazeCreationWorkflowBackEnd backend, EditorViewGridVisualisation visual) { visual.pushHandleColor(); Handles.color = tileHighlighting; visual.popHandleColor(); }
private void OnEnable() { Instance = this; LoadEditorModeOptions(); visual = new EditorViewGridVisualisation(); SceneView.onSceneGUIDelegate -= onSceneGUI; SceneView.onSceneGUIDelegate += onSceneGUI; EditorApplication.update -= onEditorApplicationUpdate; EditorApplication.update += onEditorApplicationUpdate; }
private void OnEnable() { log("Workflow Enabled"); var availableBackend = FindOrCreateBackend(); if (backend != null && backend.GetInstanceID() != availableBackend.GetInstanceID()) { log("Found old backend - destroy it..."); DestroyImmediate(backend); backend = null; } backend = availableBackend; backend.CheckCurrentSelection(); }
public virtual void ProcessEvent(Event evt, MazeCreationWorkflowBackEnd backend, EditorViewGridVisualisation visual) { if (backend == null) { Debug.Log("backend null"); } this.backend = backend; controlId = GUIUtility.GetControlID(FocusType.Passive); if (evt.type == EventType.MouseDown) { if (dragging) { DragEnds(); } Click(evt, evt.button); } if (evt.type == EventType.MouseDrag) { Drag(evt, evt.button); } if (evt.type == EventType.MouseUp) { if (dragging) { DragEnds(); } Click(evt, evt.button); } }
public virtual void OnGUI(MazeCreationWorkflowBackEnd backend) { EditorGUILayout.HelpBox(Name, MessageType.Info); }