Use filename as fallback instead of the class name for mesh instance loaded by dragging from file to editor.
This commit is contained in:
parent
8dd00ed176
commit
79ca8e7305
1 changed files with 1 additions and 1 deletions
|
@ -3238,7 +3238,7 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P
|
|||
if (mesh != NULL) {
|
||||
MeshInstance *mesh_instance = memnew(MeshInstance);
|
||||
mesh_instance->set_mesh(mesh);
|
||||
mesh_instance->set_name(mesh->get_name());
|
||||
mesh_instance->set_name(path.get_file().get_basename());
|
||||
instanced_scene = mesh_instance;
|
||||
} else {
|
||||
if (!scene.is_valid()) { // invalid scene
|
||||
|
|
Loading…
Reference in a new issue