void HandleUndoRedoPerformed() { if (ToolManager.IsActiveTool(this)) { m_CurrentState = ShapeState.ResetState(); } }
void ActionPerformed(MenuAction newActionPerformed) { if (ToolManager.IsActiveTool(m_Tool) && newActionPerformed.GetType() != this.GetType()) { LeaveTool(); } }
void OnActiveToolChanged() { if (ToolManager.IsActiveTool(this)) { SetBounds(currentShapeInOverlay.size); } }
void OnSelectionChanged() { if (ToolManager.IsActiveTool(this)) { if (Selection.activeGameObject != null) { m_CurrentState = ShapeState.ResetState(); ToolManager.RestorePreviousTool(); } } }
void OnSelectionChanged() { if (ToolManager.IsActiveTool(this)) { if (Selection.activeGameObject != null && MeshSelection.activeMesh != currentShapeInOverlay.mesh) { m_CurrentState = ShapeState.ResetState(); ToolManager.RestorePreviousTool(); } } }
void OnSelectionChanged() { if (ToolManager.IsActiveTool(this)) { if (Selection.activeGameObject != null && (MeshSelection.activeMesh == null || MeshSelection.activeMesh.GetComponent <ProBuilderShape>() == null)) { m_CurrentState = ShapeState.ResetState(); ToolManager.RestorePreviousTool(); } } }
void OnToolChanged() { if (ToolManager.IsActiveTool(this)) { UpdateTarget(); if (polygon == null) { End(); } } else if (polygon != null) { End(); } }
void OnToolChanged() { if (ToolManager.IsActiveTool(this)) { UpdateTarget(); if (polygon == null) { End(); } } else if (polygon != null) { End(); EditorApplication.delayCall += () => CheckForSelectModeAfterToolQuit(); } }
void OnSelectModeChanged(SelectMode selectMode) { if (!ToolManager.IsActiveTool(this)) { return; } if (MeshSelection.activeMesh) { PolyShape shape = MeshSelection.activeMesh.GetComponent <PolyShape>(); if (shape != null && shape != polygon || selectMode != SelectMode.Object) { LeaveTool(false); } } }
void OnObjectSelectionChanged() { if (!ToolManager.IsActiveTool(this) || polygon == null) { return; } if (MeshSelection.activeMesh) { PolyShape shape = MeshSelection.activeMesh.GetComponent <PolyShape>(); if (shape == null) { LeaveTool(true); } else if (shape != polygon) { UpdateTarget(shape); } } }
public static bool IsActiveTool(EditorTool tool) { return(ToolManager.IsActiveTool(tool)); }