瀏覽代碼

When Camera2D enters tree, ensure first update is not lost

Marcel Admiraal 3 年之前
父節點
當前提交
a124d89f01
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scene/2d/camera_2d.cpp

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

@@ -254,9 +254,8 @@ void Camera2D::_notification(int p_what) {
 			// if a camera enters the tree that is set to current,
 			// it should take over as the current camera, and mark
 			// all other cameras as non current
-			_set_current(current);
-
 			first = true;
+			_set_current(current);
 
 		} break;
 		case NOTIFICATION_EXIT_TREE: {