Search Issue Tracker
Won't Fix
Votes
3
Found in
2020.3
2020.3.3f1
2021.1
2021.2
Issue ID
1327771
Regression
No
EditorUtility.CopySerialized with Sprite generates excessive data
Reproduction steps:
1. Open attached project "CopySerializedIssue.zip"
2. Select Assets -> Create -> Diced Sprite Atlas
3. In Project window, select the newly created Diced Sprite Atlas
4. From Project window, drag-drop Assets/Textures folder to the Inspector window -> Input Folder field
5. In Inspector window, press Build Atlas, observe Generated Data Size field
6. In Inspector window, press Rebuild Atlas, observe Generated Data Size field
Expected result: The size stays the same (8 KB)
Actual result: The size increases (8KB -> 10KB)
Reproducible with: 2020.3.9f1, 2021.1.8f1, 2021.2.0a17
Could not test with: 2018.4.35f1, 2019.4.26f1 (package version dependencies break project)
Note:
The size increases only after the first Rebuild. To reproduce the issue again, you need to delete the Diced Sprite Atlas and Generated Data assets, then repeat steps 1-6.
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
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note:
The difference is Editor only data (AtlasRD) which gets reinitialized due to the way DicedSpriteAtlasEditor.cs creates Sprites. It seems the same Sprite is being reloaded and saved again on Rebuild. This is by design.
To avoid such behavior, please use Importer Workflow (ScriptedImporter)
https://docs.unity3d.com/Manual/ScriptedImporters.html
Please take a look at PSDImporter for an example of Importer creating Sprites.