/// <summary>This is called when the Tool is deselected in the editor.</summary> public override void OnWillBeDeactivated() { base.OnWillBeDeactivated(); CinemachineSceneToolUtility.SetTool(false, GetType()); m_State.refreshIcon = true; m_State.isSelected = false; }
protected CinemachineExclusiveEditorToolbarToggle() { var type = GetType(); this.RegisterValueChangedCallback( v => CinemachineSceneToolUtility.SetTool(v.newValue, type)); CinemachineSceneToolUtility.RegisterExclusiveToolHandlers(type, isOn => value = isOn, display => style.display = display ? DisplayStyle.Flex : DisplayStyle.None); }