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
Comments (1)
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.