-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing objects with and without _nav causes node name collision #72483
Labels
Comments
There actually is logic to prevent the rename (so keep the suffix) if there would be a clash and the suffix is godot/editor/import/resource_importer_scene.cpp Lines 783 to 787 in 0810eca
But it looks like this was not done in other cases. I agree life would be simpler if we would not do the renames. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
4.0beta16+0810eca
System information
Windows 10
Issue description
The function in
ResourceImporterScene::_pre_fix_node
which handles suffixes such as_col
or_vehicle
or_nav
removes the suffix, which can cause a name collision with another node.Due to the API used (
set_name
followed byreplace_by
), it can cause a name conflict to occur.Elsewhere in the gltf importer, an explicit uniqueness is guaranteed, and additionally
Node::add_child(..., true)
protects against duplicate names in a better way.I think it would be better to avoid removing the extension, but this would be compat breaking. Maybe we can add an option in 4.1 or later. (Not removing the extension would reduce the risk of affecting documents in which the "_wheel" naming was accidental, as in this issue: #72419 )
Steps to reproduce
@
symbolMinimal reproduction project
Duplicate_Collider_Name_Test.zip
The text was updated successfully, but these errors were encountered: