Search Issue Tracker
Not Reproducible
Votes
2
Found in
2017.2.0b1
2017.4.3f1
Issue ID
1072499
Regression
Yes
'Referenced script missing' warning occurs when frenquently invoke Resources.UnloadUnusedAssets and AssetBundle.LoadAssetAsync
When calling Resources.UnloadUnusedAssets and AssetBundle.LoadAssetAsync a lot in the game, sometimes there is 'Referenced script on this Behaviour is missing!' popping up
To reproduce:
1. Download attached project "missscript.zip" and open in Unity
2. Open "main" scene
3. Enter Play mode
4. Quickly click the button "load prefab" and "unload prefab" in Game window for many times
5. Observe that Console prints error after the action repeat within 10 times
Notes:
- This issue appears on both Windows and OSX
- Console log is shared in Comments section
- This issue may have been fixed in 5.6 - https://fogbugz.unity3d.com/f/cases/822393/
- Every time you want to reproduce it again, you should reboot Unity
Reproduced on Unity 2017.2.0b1, 2017.2.3p3, 2017.3.2f1, 2017.4.9f1, 2018.1.9f1, 2018.2.5f1 and 2018.3.0a9
Not reproduced on Unity 2017.1.5f1 and 2017.2.0a4
Regression on Unity 2017.2.0b1
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
felix_choi
Oct 15, 2018 08:52
The same problem occurs on 2018.1.8f1. And come with a message "A script behaviour (script unknown or not yet loaded) has a different serialization layout when loading.".
It can be randomly triggered when calling "Resources.UnloadUnusedAssets();" after with "assetbundle.LoadAssetAsync<T>".
p.s if more Resources had been Loaded by "LoadAsset" before doing the action above, it seems to be more easy to occur.
In my case, it can be avoided by scheduling "Resources.UnloadUnusedAssets()" and "assetbundle.LoadAssetAsync<T>", so that they will not be run at the same time.