Skip to content

Commit

Permalink
Merge pull request #85594 from addmix/camera3d-current-bug
Browse files Browse the repository at this point in the history
Prevent `Camera3D.current` from being set to `true` automatically in the editor.
  • Loading branch information
YuriSizov committed Dec 19, 2023
2 parents 4d69598 + 5b5ac92 commit 252c462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/3d/camera_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void Camera3D::clear_current(bool p_enable_next) {
if (get_viewport()->get_camera_3d() == this) {
get_viewport()->_camera_3d_set(nullptr);

if (p_enable_next) {
if (p_enable_next && !Engine::get_singleton()->is_editor_hint()) {
get_viewport()->_camera_3d_make_next_current(this);
}
}
Expand Down

0 comments on commit 252c462

Please sign in to comment.