Search Issue Tracker
By Design
Votes
0
Found in
5.3.4p6
Issue ID
795524
Regression
Yes
bundle.Unload sometimes doesn't work
To reproduce:
- Open the project and build the AssetBundles (Assets/Build AB)
- Open the Loader scene and change URLs on Loader script
- Press play. Everything works fine.
- Uncomment this line in Loader.cs: bundle.Unload(false);
- Press play and see that everything has been unloaded in the loaded scene.
- Change the call to bundle.Unload(true);
- Press play and see that everything has been unloaded in the loaded scene.
Reproducible: 5.5.0a1, 5.4.0b18, 5.3.5f1
Notes on why this is "Resolved (By Design)":
The root cause in this case is user called AssetBundle.Unload() right after SceneManager.LoadScene() without yield return null.
SceneManager.LoadScene() is not a real synchronous API, it only guarantee to be finished before next frame, users need to call yield return null after it.
Actually, we highly recommend users to use SceneManager.LoadSceneAsync().
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
Add comment