protected virtual void OnEnable() { mScreenGuideEditor = new CinemachineScreenComposerGuides(); mScreenGuideEditor.GetHardGuide = () => { return(Target.HardGuideRect); }; mScreenGuideEditor.GetSoftGuide = () => { return(Target.SoftGuideRect); }; mScreenGuideEditor.SetHardGuide = (Rect r) => { Target.HardGuideRect = r; }; mScreenGuideEditor.SetSoftGuide = (Rect r) => { Target.SoftGuideRect = r; }; mScreenGuideEditor.Target = () => { return(serializedObject); }; Target.OnGUICallback += OnGUI; UnityEditorInternal.InternalEditorUtility.RepaintAllViews(); }
protected virtual void OnEnable() { mScreenGuideEditor = new CinemachineScreenComposerGuides(); mScreenGuideEditor.GetHardGuide = () => { return(Target.HardGuideRect); }; mScreenGuideEditor.GetSoftGuide = () => { return(Target.SoftGuideRect); }; mScreenGuideEditor.SetHardGuide = (Rect r) => { Target.HardGuideRect = r; }; mScreenGuideEditor.SetSoftGuide = (Rect r) => { Target.SoftGuideRect = r; }; mScreenGuideEditor.Target = () => { return(serializedObject); }; CinemachineDebug.OnGUIHandlers -= OnGUI; CinemachineDebug.OnGUIHandlers += OnGUI; InspectorUtility.RepaintGameView(Target); }
protected virtual void OnEnable() { mScreenGuideEditor = new CinemachineScreenComposerGuides(); mScreenGuideEditor.GetHardGuide = () => { return(Target.HardGuideRect); }; mScreenGuideEditor.GetSoftGuide = () => { return(Target.SoftGuideRect); }; mScreenGuideEditor.SetHardGuide = (Rect r) => { Target.HardGuideRect = r; }; mScreenGuideEditor.SetSoftGuide = (Rect r) => { Target.SoftGuideRect = r; }; mScreenGuideEditor.Target = () => { return(serializedObject); }; mGameViewEventCatcher = new GameViewEventCatcher(); mGameViewEventCatcher.OnEnable(); CinemachineDebug.OnGUIHandlers -= OnGUI; CinemachineDebug.OnGUIHandlers += OnGUI; if (CinemachineSettings.CinemachineCoreSettings.ShowInGameGuides) { InspectorUtility.RepaintGameView(); } }
protected virtual void OnEnable() { m_ScreenGuideEditor = new CinemachineScreenComposerGuides(); m_ScreenGuideEditor.GetHardGuide = () => { return(Target.HardGuideRect); }; m_ScreenGuideEditor.GetSoftGuide = () => { return(Target.SoftGuideRect); }; m_ScreenGuideEditor.SetHardGuide = (Rect r) => { Target.HardGuideRect = r; }; m_ScreenGuideEditor.SetSoftGuide = (Rect r) => { Target.SoftGuideRect = r; }; m_ScreenGuideEditor.Target = () => { return(serializedObject); }; m_GameViewEventCatcher = new GameViewEventCatcher(); m_GameViewEventCatcher.OnEnable(); CinemachineDebug.OnGUIHandlers -= OnGUI; CinemachineDebug.OnGUIHandlers += OnGUI; if (CinemachineSettings.CinemachineCoreSettings.ShowInGameGuides) { InspectorUtility.RepaintGameView(); } #if UNITY_2021_2_OR_NEWER CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); #endif }