Hi, I’m very new to unity and coding and I have to make a simple game for my uni course.
All I want is a to make a button on the main menu that when clicked will load the level.
I’ve made the menu screen with a “Start” text (I think I made it a 3D text, not GUI) and this is the script I’ve got so far that I’ve managed to jumble together from looking at other online sources but it doesn’t work:
using UnityEngine;
using System.Collections;
public class ButtonScript: MonoBehaviour
{
public bool isQuit = false;
void OnMouseDown ()
{
if(isQuit)
{
Application.Quit ();
}
else
{
Application.LoadLevel (“flyinglevel”);
}
}
}
Any help would be greatly appreciated
Thanks
Chris