I have it so that when you hover the mouse over the text it gets smaller and when you click the text the application will exit if isQuit is checked in unity. It won’t work though. Please help!
using UnityEngine;
using System.Collections;
public class MainMenu : MonoBehaviour
{
public bool isQuit;
void OnMouseEnter()
{
transform.localScale = new Vector3 (.085f,.085f, .085f);
}
void OnMouseExit()
{
transform.localScale = new Vector3 (.1f, .1f, .1f);
}
void OnMouseUp()
{
if (isQuit == true) {
Application.Quit ();
}
}