Exemple #1
0
 /// <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;
 }
Exemple #2
0
        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);
        }