hi guys,
I'm really struggling to work out how to make an ios button from a ui image?? Ive tried so many things and cant seem to get it working, the below script works but makes the whole screen clickable which obviously doesn't work with multiple buttons :'(
Any suggestions?
using UnityEngine;
using System.Collections;
using UnityEngine.UI; //Required
//LOADS LEVEL/SCENE FROM THE UI
public class LoadSceneIOS : MonoBehaviour {
public string loadTheScene;
void Update () {
foreach (Touch touch in Input.touches) {
if (touch.phase == TouchPhase.Began){
Application.LoadLevel(loadTheScene); //Load the scene
}
}
}
}
↧