Hello,
I want to change to another level by pressing on a cube and I only want to detect the touch on the cube how can I do ? I know that on the PC it’s OnMouseDown()I think but what for Android ?
Thank You
Hello,
I want to change to another level by pressing on a cube and I only want to detect the touch on the cube how can I do ? I know that on the PC it’s OnMouseDown()I think but what for Android ?
Thank You
OnInputDown()
Edit: I already showed you…
http://docs.unity3d.com/Documentation/ScriptReference/Input.html
#pragma strict
function Start () {
gameObject.AddComponent(typeof(BoxCollider));
}
function OnInputDown () {
Debug.Log("HI");
Application.LoadLevel(Application.loadedLevelName);
}
Thank you Jessespike for your answer but it doesn’t work
Any one ?