public ConvertToBrushesButton() { ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip); this.clicked += OnClicked; ChiselSelectionManager.GeneratorSelectionUpdated += UpdateEnabledState; UpdateEnabledState(); }
public static void DeactivateTool(bool selectNode = false) { if (!IsActive()) { return; } // Unity has unreliable events ChiselGeneratorManager.GeneratorMode.OnDeactivate(); ToolManager.RestorePreviousPersistentTool(); if (!IsActive()) { return; } if (selectNode && ChiselToolbarUtility.HaveNodesInSelection()) { ChiselEditGeneratorTool.ActivateTool(); if (!IsActive()) { return; } } ToolManager.RestorePreviousTool(); if (!IsActive()) { return; } Tools.current = Tool.Move; }
public ChiselToggle(string iconName, string tooltipName) { ChiselToolbarUtility.SetupToolbarElement(this, iconName, tooltipName); UpdateEnabledState(); }
public RebuildAllButton() { ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip); this.clicked += OnClicked; }
public CenterPivotOnEachNodeInSelectionButton() { ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip); this.clicked += OnClicked; }