I'm trying to change the scene with any key pressed or mouse clicked but it doesn't seem to be giving any response in-game.
I've tried the most common solution to this on the internet :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ForMainMenu : MonoBehaviour
{
public
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.anyKeyDown)
{
SceneManager.LoadScene("Main menu");
}
}
}
I'm not sure what to apply the script on either. Right now, the script is applied to a game object.
The scenes in my assets: https://i.stack.imgur.com/DoUn6.jpg