diff options
Diffstat (limited to 'scene/resources/mesh.cpp')
-rw-r--r-- | scene/resources/mesh.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 06b147ba41..0a886c25b1 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1097,11 +1097,13 @@ void ArrayMesh::_bind_methods() { } void ArrayMesh::reload_from_file() { - for (int i = 0; i < get_surface_count(); i++) { - surface_remove(i); - } + VisualServer::get_singleton()->mesh_clear(mesh); + surfaces.clear(); + clear_blend_shapes(); + Resource::reload_from_file(); - String path = get_path(); + + _change_notify(); } ArrayMesh::ArrayMesh() { |