diff --git a/Assets/Engine/Runtime/Editor/EngineEditor.cs b/Assets/Engine/Runtime/Editor/EngineEditor.cs index 3e8a1d3..02a9be6 100644 --- a/Assets/Engine/Runtime/Editor/EngineEditor.cs +++ b/Assets/Engine/Runtime/Editor/EngineEditor.cs @@ -11,7 +11,13 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor public class EngineEditor : EditorWindow { private bool _registeredUpdateEvent; - private Button _passToNextRoomButton, _skipCurrentRoomButton, _skipAndPassButton; + + private Button + _passToNextRoomButton, + _skipCurrentRoomButton, + _skipAndPassButton, + _cameraUpButton, + _cameraDownButton; [MenuItem("Window/Engine Editor")] public static void ShowEditor() @@ -37,6 +43,16 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor text = "Skip Current And Pass To Next Room" }; rootVisualElement.Add(_skipAndPassButton); + _cameraUpButton = new Button(CameraUp) + { + text = "Camera ↑" + }; + rootVisualElement.Add(_cameraUpButton); + _cameraDownButton = new Button(CameraDown) + { + text = "Camera ↓" + }; + rootVisualElement.Add(_cameraDownButton); EditorApplication.playModeStateChanged += _ => UpdateUI(); UpdateUI(); @@ -70,6 +86,16 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor } } + private void CameraUp() + { + SceneView.lastActiveSceneView.pivot += new Vector3(0, 1000, 0); + } + + private void CameraDown() + { + SceneView.lastActiveSceneView.pivot += new Vector3(0, -1000, 0); + } + private void UpdateUI() { if (Engine.Instance && EditorApplication.isPlaying)