From 88d446f6c6eff3e3bb3013099325b9d37ce3aad3 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 7 Apr 2023 17:44:38 +0200 Subject: Prevent off-screen controls in editor (cherry picked from commit 55b50703d7d5cc6322f0806f7580ac31e8553f73) --- scene/main/scene_tree.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scene') diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index fbe11c94d1..9327102cc8 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1408,6 +1408,10 @@ SceneTree::SceneTree() { root->set_name("root"); root->set_title(GLOBAL_GET("application/config/name")); + if (Engine::get_singleton()->is_editor_hint()) { + root->set_wrap_controls(true); + } + #ifndef _3D_DISABLED if (!root->get_world_3d().is_valid()) { root->set_world_3d(Ref(memnew(World3D))); -- cgit v1.2.3