summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThreeRhinosInAnElephantCostume <myrealstemail@protonmail.com>2021-08-19 15:19:19 +0200
committerThreeRhinosInAnElephantCostume <myrealstemail@protonmail.com>2021-08-19 15:19:19 +0200
commit78e2d35a7e33da7fa5dd6214272acbd4966da97e (patch)
treeed23ec81ca136d47d06f7a59083be23721f8ed0f
parent5ccf797c9c34c8cabdda3369eaf7a98d276a6094 (diff)
fixed camera2d's "current" property getting reset when switching scenes
-rw-r--r--scene/2d/camera_2d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 13b37aa2b2..bf91ce8e65 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -261,6 +261,7 @@ void Camera2D::_notification(int p_what) {
if (viewport && !(custom_viewport && !ObjectDB::get_instance(custom_viewport_id))) {
viewport->set_canvas_transform(Transform2D());
clear_current();
+ current = true;
}
}
remove_from_group(group_name);