private void SetMode(PivotMode mode) { if (_mode == mode) { return; } icons[_mode.GetHashCode()].color = Color.white; _mode = mode; InputManager.State.ActivePivotMode = _mode; icons[_mode.GetHashCode()].color = activeColor; }
public void Repaint() { _mode = InputManager.State.ActivePivotMode; for (var i = 0; i < icons.Length; i++) { icons[i].color = _mode.GetHashCode() == i ? activeColor : Color.white; // Set mesh PivotMode.Selection interactability if (i == PivotMode.Selection.GetHashCode()) { icons[i].GetComponent <Button>().interactable = InputManager.State.ActiveTool != ToolType.Transform; } } }