Search Issue Tracker
Fixed in Unity 5.6.0
The function UnloadSceneAsync does not work with variable data type SceneManagement.Scene
1. Open the attached project;
2. Open the scene "Scene0";
3. Enter the Play mode;
4. Observe the Console window;
Actual result: an error "ArgumentExeception: Scene to unload is invalid" shows up. The load scene is not removed from the SceneManager.
Expected result: the load scene should be removed from the SceneManager.
Workaround: in the documentation https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.UnloadSceneAsync.html is written that the function UnloadSceneAsync variable can be int, string and SceneManagement.Scene data types. Everything works correctly with int and string types. However, the function does not understand SceneManagement.Scene data type variable.
Reproduced with: 5.5.0b4, 5.5.0f3, 5.6.0b4
Not reproducible with 5.4 and older versions because the function "UnloadSceneAsync" is not supported.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Unity crash in SerializedFile::ReadMetadata<false> when AssetBundle. LoadFromMemory() is called
- ProceduralMaterial.ClearCache() on "Do Nothing" Substance triggers RebuildTextures
- Setting "Default Behavior Mode" to "2D" breaks HDR rendering
- Crash in GdipCreateBitmapFromStream when calling System.Drawing.Bitmap constructor
- DLL files are not excluded during building for standalone platform, even though they are selected to be excluded