After building an asset bundle for a scene using BuildPipeline.BuildStreamedSceneAssetBundle() I can load the scene from the bundle just fine using Application.LoadLevel(). However, Application.LoadedLevelName is an empty string. This doesn’t seem right to me.
I can understand Application.LoadedLevel being -1 (the value it returns for a scene loaded from an asset bundle), but since the scene was loaded using its name, it baffles me that Application.LoadedLevelName should be empty. Am I missing something? Is this a bug? or is it intended behavior?
I’ve tried searching here and various other sites and haven’t managed to find anything dealing with these variables directly when loading scenes from an asset bundle. I know I can write my own wrapper for loading levels and tracking the name, but I’d prefer to utilize the built in functionality of Unity as much as possible.
Thanks!