Hi,
I have a problem with Unity Scene Management, so it was like this,
I tried to load another scene via AsyncLoadScene, but it always returns -1.
The scene I want to load already in Build Settings.
When I tried to make a Debug.Log(SceneManagement.GetSceneByName(“SceneName”)) on Awake function it returns -1
I also test to debug log SceneManagement.sceneCount and it returns 1, but SceneManagement.sceneCountInBuildSettings returns 3.
Example, I got 2 scenes, 1 is named A, and 2 is named B.
I try to debug log get active scene name on A scene, returns A, try to Load A scene, and works.
I try to debug log get scene by name B from A, it returns -1. Try to load B scene from A, returns -1.
And yes, I don’t forget about using UnityEngine.SceneManagement.
The problem probably located on SceneManagement. I just don’t get it why and how unity can returns 1 even I already add it to my Build Settings. I miss Application.LoadLevel.
Thanks for any answers.