Question:
public void LoadLevel(int lvlnum)
{
Application.LoadLevel(lvlnum);
}
This is the function I am calling to load the level however unity is saying: " Application.LoadLevel is obsolete: Use SceneManager.LoadScene
What does unity mean by this?? Where exactly do I add that code if that is the case?
1 Answer
1
Unity now requires you to do things a bit differently.
As Unity tells you, you’ll have to use the SceneManager.LoadScene instead of Application.LoadLevel. This is done like this:
// Include the SceneManagement class
using UnityEngine.SceneManagement;
public void LoadLevel (int lvlnum)
{
SceneManager.LoadScene(lvlnum);
}
If you want to avoid the using directive then you can also do it like this:
public void LoadLevel (int lvlnum)
{
UnityEngine.SceneManagement.SceneManager.LoadScene(lvlnum);
}
There are plenty of available information about this and a Google search would properly have helped you as well.
i would consider it more of a 2.5d side scroller .. i want my character to kinda like travel with the projectile as if he became it and shoot himself forward
– waittobi