i have a button script that used to work on a previous game i’ve made, but it doesnt work now. what is wrong with it?
heres the script, its C#
using UnityEngine;
using System.Collections;
public class Button1 : 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"); //Make sure that level "1" is located in your build settings. You can also change the 1 with a name of your scene.
}
}
}