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
- Scene Views breaks and errors are spammed in the Console when the Game view is shrunk vertically to the minimum, and the Aspect Ratio is 16:9 or 16:10
- Slider Fill Area disappears after undoing “Set Native Size” change
- Crash with multiple stack traces when playing video on a render texture with low-end graphics devices
- Circle handle of the Game view scale slider bar disappears when the scale is set to 1x
- Asset Bundles non-deterministic behavior with CRCs and hash when a video has Transcoding enabled and Sprite Atlas has an override option enabled
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.