Trying to load scenes, but the udemy class that I’m taking is apparently obsolete and is still using Application.LoadLevel (), now I have to figure out how to use SceneManagement.
Here’s what I have:
using UnityEngine.SceneManagement;
public class SceneManagement : MonoBehaviour {
public void LoadScene (string Game)
{
Debug.Log ("Level load requested for" + Game);
SceneManager.LoadScene (Game);
}
public void QuitRequest () {
Debug.Log ("program termination requested");
}
It keeps saying :
The referenced Behaviour (Game Object ‘LvlManager’ is missing
What it’s supposed to do is switch levels on click. It runs in play mode, but it’s not switching levels and I’m getting missing script notifications.
I’m pretty sure that the SceneManager class needs some extra parameters to function, or a secondary script, but I have no idea what those would be.
(Thank you, I’m new to coding and have no idea what I’m doing)