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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
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.