Search Issue Tracker
Won't Fix
Votes
0
Found in
Issue ID
1098568
Regression
No
ScriptedImporters should allow objects of different types to have the same name.
ScriptedImporters should allow objects of different types to have the same name as an identifier.
It's understandable that assets of the same type need to be uniquely identified by name/path. However, if the types are different (e.g. GameObject & Mesh) this should not be a problem and we shouldn't get a "Identifier uniqueness violation: 'mosaic-logo'. Scripted Importers do not guarantee that subsequent imports of this asset will properly re-link to these targets." warning.
This could be avoided by adding the asset path or object type to identifier, regardless if the name is chosen as the main identifier.
If deactivating the warning in general is not possible, maybe some kind of annotation/attribute to suppress it would be a compromise.
There's a sample project that describes this problem in https://fogbugz.unity3d.com/default.asp?1097093.
Thanks!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (2021.2.X):
All Managed types are being resolved as their native counterpart to generate the id, which would be Monobehaviour for most of the types (everything inheriting from Monobehaviour or ScriptableObject are just plain monobaheviour in native code).
Because of that, the ids would be found as duplicates on most types used by users or from packages, which we don't think is worth the change just to allow Meshes and GameObject to have the same names.
It is also useful to note that the name for the id is separated from the Object name itself, thus it is totally fine to have a mesh named "mosaic-logo" and use "mosaic-logo-mesh" for its registration.