فهرست منبع

Don't update CSG Shape when not inside tree

(cherry picked from commit 07042b40440a3af90539ddc5c7a8fcb0a178074e)
Haoyu Qiu 4 سال پیش
والد
کامیت
bdbd34b388
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      modules/csg/csg_shape.cpp

+ 2 - 2
modules/csg/csg_shape.cpp

@@ -269,9 +269,9 @@ void CSGShape::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const f
 }
 
 void CSGShape::_update_shape() {
-
-	if (parent)
+	if (parent || !is_inside_tree()) {
 		return;
+	}
 
 	set_base(RID());
 	root_mesh.unref(); //byebye root mesh