using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Control : MonoBehaviour
{
[SerializeField] private string newLevel;
public void NextScene()
{
if (Input.GetKeyDown(KeyCode.Return)){
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
}
So I have this script that is supposed to load the next scene when I press enter. However, It doesn’t work. this is attached to a gameObject, because using canvas was annoying af. What am I doing wrong?