Hello. I have been trying to read input from a ui. Basically, I want my camera to know when a gameobject with a guitexture has been touched ( I am developing for mobile, more specifically, ios). My guitexture knows when it has been touched, but I need a way to send the information that the gameobject has been clicked across scripts. Do I use a global variable? My script is in c#, named Test, and is:
using UnityEngine;
using System.Collections;
public class Test: MonoBehaviour
{
void OnMouseDown()
{
Debug.Log ("Mouse Down");
}
void OnMouseUp()
{
Debug.Log ("Mouse up");
}
}
I would appreciate it very much if someone could explain how I would go about doing this. Thank you for your time! (Note: jump-ui is the empty gameobject)