Search Issue Tracker
By Design
Votes
4
Found in
2021.2.0a7
2021.2.2f1
2022.1
Issue ID
1381855
Regression
No
Identifier uniqueness violation, Sprite Renderer loses Sprite property when using TextureImporter.spritesheet
Reproduction steps:
1. Open the user's attached project
2. Reimport the "fruits_sheet" in Assets/Sprites
3. Right-click the "fruits_sheet" and select "Split (4 sprites)"
4. Observe warning in the Console window
5. Drag and drop the orange and the crate Sprites into the Scene
6. Enter Play mode
Expected result: Both the orange and the crate are visible in the Game view
Actual result: An "Identifier uniqueness violation" warning appears in the Console, the crate loses its Sprite under Sprite Renderer. Full warning:
Identifier uniqueness violation: 'Name:sprite-3, Type:Sprite, FileId:0'. Multiple Objects with the same FileId are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Reproducible with: 2021.2.0a7, 2021.2.5f1, 2022.1.0b2
Not reproducible with: 2019.4.33f1, 2020.3.25f1, 2021.2.0a6
Comments (1)
-
Masterio
Dec 22, 2021 20:40
Whole Project stoppped ...
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:
When creating Sprite Rects via a tool, the data provider interfaces (https://docs.unity3d.com/Packages/com.unity.2d.sprite@1.0/api/UnityEditor.U2D.Sprites.ISpriteEditorDataProvider.html) should be used, rather than changing the Sprite Rect data directly inside the TextureImporter itself. For an example on how to use the data provider interfaces, see the following forum post: https://forum.unity.com/threads/how-to-change-individual-spritesheet-in-textureimporter-object-without-regenerating-all-spriteids.631252/#post-7381619