Hi,
I’m using AssetBundle and I got headache not using Application.LoadedLevelName anymore. Because when you use scene from asset bundle, Application.LoadedLevelName is empty (for reason, I don’t wanna dig in it
)
Can someone have a solution ?
Because if i set a string BEFORE the loading : It’s not ok, if something go at the same frame, it can detect he’s not on the right scene.
If i set a string AFTER the loading, it miss the OnLevelWasLoaded() and Awake() function of the script in the loaded scene, because the loading wait of “isDone” in a coroutine, which is called after all of these functions.
I set the string during the OnLevelWasLoaded of my loader : you lose again, cause OnLevelWasLoaded() doesn’t seems to be called by order define in Script Execution Order, so it can miss some script.
How can I replace Application.LoadedLevelName with a 100% secure solution ?
Thanks a lot !