I made a menu, looked through many tutorials and videos, but ran into a problem: I added some buttons to the Canvas and tried to hang a couple of functions on the buttons, but after adding the script, the buttons are not pressed. Source:
using UnityEngine; using UnityEngine.SceneManagement; public class main_menu : MonoBehaviour { public void Start1() { SceneManager.LoadScene("Part1"); Grid easy = new Grid( 100, 10, 10); } public void Start2() { SceneManager.LoadScene("Part2"); Grid Hard = new Grid(100, 10, 10); } public void Exit() { Application.Quit(); } }
Is it possible that the reason why the buttons are not pressed is another?