Quantcast
Channel: Questions in topic: "assetbundle"
Viewing all articles
Browse latest Browse all 1593

Can someone explain this exception? ArgumentException: SceneManager.SetActiveScene failed; invalid scene

$
0
0
I am loading a scene from an asset bundle. Everything was working fine, but then I switched to loading the scene additively and now I'm getting a strange exception when I try to set the scene active. Here's my code: IEnumerator LoadSceneCoroutine(string pSceneName){ yield return SceneManager.LoadSceneAsync(pSceneName,LoadSceneMode.Additive); Scene chapterScene = SceneManager.GetSceneByName(pSceneName); SceneManager.SetActiveScene(chapterScene); } I get an exception: **ArgumentException: SceneManager.SetActiveScene failed; invalid scene** What does this mean? What about my scene is invalid? Are there certain requirements that must be met for a scene to be set active? A google search for this error returns almost no results and the documentation is not helpful either so I'm stumped. Please help! Thanks.

Viewing all articles
Browse latest Browse all 1593

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>