소스 검색

Remove double `is_editor_hint()` check inside `NOTIFICATION_READY` for `Camera2D` node

`Engine::get_singleton()->is_editor_hint()` is already a part of `is_part_of_edited_scene()` function.
arkology 11 달 전
부모
커밋
99886f3204
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/2d/camera_2d.cpp

+ 1 - 1
scene/2d/camera_2d.cpp

@@ -277,7 +277,7 @@ void Camera2D::_notification(int p_what) {
 	switch (p_what) {
 	switch (p_what) {
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 		case NOTIFICATION_READY: {
 		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));
 				ProjectSettings::get_singleton()->connect(SNAME("settings_changed"), callable_mp(this, &Camera2D::_project_settings_changed));
 			}
 			}
 		} break;
 		} break;