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
- [VFX] Custom HLSL with 'int' parameter, without the 'in/out/inout' access modifier is not supported
- [Windows] Lens Flare doesn't work in the Lens Flare Showroom URP Sample Scene
- Crash on ujob_execute_job while using OverlapBoxCommand when collisions are more than maxHits
- The validity of the multiple handles can behave differently based on the load/release operations order, when multiple Addressables.LoadAssetAsync and Addressables.Release are used to load and release the same Addressable Asset
- Dynamic text is rendered in the background when it is inside the <font> tag
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.