diff --git a/Source/Editor/Windows/SceneTreeWindow.cs b/Source/Editor/Windows/SceneTreeWindow.cs index 851cd62f3..75a3723cf 100644 --- a/Source/Editor/Windows/SceneTreeWindow.cs +++ b/Source/Editor/Windows/SceneTreeWindow.cs @@ -104,11 +104,6 @@ namespace FlaxEditor.Windows headerPanel.Parent = this; - Editor.PlayModeBeginning += () => _blockSceneTreeScroll = true; - Editor.PlayModeBegin += () => _blockSceneTreeScroll = false; - Editor.PlayModeEnding += () => _blockSceneTreeScroll = true; - Editor.PlayModeEnd += () => _blockSceneTreeScroll = false; - // Setup input actions InputActions.Add(options => options.TranslateMode, () => Editor.MainTransformGizmo.ActiveMode = TransformGizmoBase.Mode.Translate); InputActions.Add(options => options.RotateMode, () => Editor.MainTransformGizmo.ActiveMode = TransformGizmoBase.Mode.Rotate); @@ -117,6 +112,34 @@ namespace FlaxEditor.Windows InputActions.Add(options => options.LockFocusSelection, () => Editor.Windows.EditWin.Viewport.LockFocusSelection()); InputActions.Add(options => options.Rename, RenameSelection); } + + /// + public override void OnPlayBeginning() + { + base.OnPlayBeginning(); + _blockSceneTreeScroll = true; + } + + /// + public override void OnPlayBegin() + { + base.OnPlayBegin(); + _blockSceneTreeScroll = false; + } + + /// + public override void OnPlayEnding() + { + base.OnPlayEnding(); + _blockSceneTreeScroll = true; + } + + /// + public override void OnPlayEnd() + { + base.OnPlayEnd(); + _blockSceneTreeScroll = true; + } /// /// Enables or disables vertical and horizontal scrolling on the scene tree panel.