Can't load a scene while testing in the editor...

So, I’m making a game, and I have a UI button that calls a function when pressed. However, it returns the following error in the console:


If anybody has the knowledge to fix this error, I would greatly appreciate it!
My Code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneLoaderNoLoadscreen : MonoBehaviour
{
    public async void LoadScene(string sceneName) {
        SceneManager.LoadScene(sceneName);
    }
}

Unity Version: 2021.3.4f1

Let me see… a good first stop might be to see if you did indeed add your Game scene into editor build settings?

3 Likes

It goddamn works. Thought it would automatically build it with all scenes… I’m dumb. Anyway, thanks a lot!

1 Like