Search Issue Tracker
Getting errors using Resources.UnloadUnusedAssets when loading assets asynchronously
1. Open attached project "UnloadUnusedBugReport.zip"
2. Open "LoadAssetBugReport.unity" scene
3. Enter Play mode
Expected result: Unused Assets are unloaded without errors
Actual result: getting an error and a lot of warnings in the console
Error: "A script behaviour (script unknown or not yet loaded) has a different serialization layout when loading. (Read 40 bytes but expected 52 bytes)"
2017.4.0f1 2017.4.18f1 2018.3.2f1 2019.1.0a13
Commenting out line-59 Resources.UnloadUnusedAssets(); from script LoadAssertBugReport.cs prevents the errors.
Tested on MacOS 10.14
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- TreeView Child display toggle styling becomes reversed when clicking and dragging it
- Null is returned when using FocusOutEvent.relatedTarget
- Unity_BaseInstanceID is always zero when rendering multiple meshes and instancing with the same buffer
- UI Document button's text does not resize relatively when size in percentage (%) is used
- Event.current.mousePosition has an offset of 1px along the y-axis in WebGL build when the mouse button is released