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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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