Sfoglia il codice sorgente

Don't update CSG Shape when not inside tree

Haoyu Qiu 4 anni fa
parent
commit
07042b4044
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      modules/csg/csg_shape.cpp

+ 1 - 1
modules/csg/csg_shape.cpp

@@ -280,7 +280,7 @@ void CSGShape3D::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const
 }
 
 void CSGShape3D::_update_shape() {
-	if (parent) {
+	if (parent || !is_inside_tree()) {
 		return;
 	}