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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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.