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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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