Skip to content

Commit

Permalink
Remove double is_editor_hint() check inside NOTIFICATION_READY fo…
Browse files Browse the repository at this point in the history
…r `Camera2D` node

`Engine::get_singleton()->is_editor_hint()` is already a part of `is_part_of_edited_scene()` function.
  • Loading branch information
arkology authored Nov 25, 2024
1 parent 0c45ace commit 99886f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void Camera2D::_notification(int p_what) {
switch (p_what) {
#ifdef TOOLS_ENABLED
case NOTIFICATION_READY: {
if (Engine::get_singleton()->is_editor_hint() && is_part_of_edited_scene()) {
if (is_part_of_edited_scene()) {
ProjectSettings::get_singleton()->connect(SNAME("settings_changed"), callable_mp(this, &Camera2D::_project_settings_changed));
}
} break;
Expand Down

0 comments on commit 99886f3

Please sign in to comment.