Iam making a main menu in unity and i got a “start game” function and a quit game function that is working fine. But i got a load option that doesnt work. Can someone help me with this. I want the main menu to go to another “window” when the user click the text Load Game.
This is my code
using UnityEngine;
using System.Collections;
public class MenuObject : MonoBehaviour
{
public bool isQuit = false;
void OnMouseEnter()
{
renderer.material.color = Color.blue;
}
void OnMouseExit()
{
renderer.material.color = Color.white;
}
void OnMouseDown()
{
if(isQuit)
{
Application.Quit();
}
else
{
Application.LoadLevel(1);
}
}
}
I have followed this tutorial: http://www.youtube.com/watch?v=yjCEGIVj84Q