unity3d - Application.LoadLevel("string") is obsolete -


this question has answer here:

i got code has lots of application.loadlevel("whatever");. monodevelop says obsolete , should use scenemanager.loadscene instead. how do that?

actually application.loadlevel("whatever"); line doesn't work unless add corresponding scene "build settings"

just import unityengine.scenemanagement this:

 using unityengine.scenemanagement; 

then replace every application.loadlevel("whatever"); with:

scenemanager.loadscene("whatever"); 

...it can done in 1 line:

unityengine.scenemanagement.scenemanager.loadscene("whatever"); 

Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -