Browse Source

Fix `MultiMesh` errors in editor and resource duplication

yds 10 months ago
parent
commit
cb94652c34
1 changed files with 3 additions and 0 deletions
  1. 3 0
      scene/resources/multimesh.cpp

+ 3 - 0
scene/resources/multimesh.cpp

@@ -195,6 +195,9 @@ Vector<Color> MultiMesh::_get_custom_data_array() const {
 #endif // DISABLE_DEPRECATED
 
 void MultiMesh::set_buffer(const Vector<float> &p_buffer) {
+	if (instance_count == 0) {
+		return;
+	}
 	RS::get_singleton()->multimesh_set_buffer(multimesh, p_buffer);
 }