I setup a GUI Texture touch input script but i needed some simple help where and how would i include my Application.loadlevel(“Stage1”)
in this Script? It is C#… Any help please.
using UnityEngine;
using System.Collections;
public class touch : MonoBehaviour {
// Update is called once per frame
void Update () {
if(Input.touches.Length <=0)
{
}
else
{
//loop through all the touches
for(int i = 0; i < Input.touchCount; i++)
{
if(this.guiTexture.HitTest(Input.GetTouch(i).position))
{
if(Input.GetTouch(i).phase == TouchPhase.Began)
{
Debug.Log("The Touch has begun on" + this.name);
}
{
if(Input.GetTouch(i).phase == TouchPhase.Ended)
{
Debug.Log("The Touch has ended on" + this.name);
}
}
}
}
}
}
}