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