- Home /
Changing level on Android
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
Answer by SilenT612 · Oct 30, 2012 at 06:49 PM
Thank you Jessespike for your answer but it doesn't work :(
Answer by SilenT612 · Oct 31, 2012 at 03:19 PM
Any one ? :(
This is not a forum, do now post new answers as replies.
So how I'm I supposed to resolve my problem if my question would fall in older pages ? ...
Bumping is a forum behavior, but anyway, comments push your question to first page.
Answer by Jessespike · Oct 29, 2012 at 11:20 PM
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 after checking, it works I putted OnInputDown() as function OnInputDown() ins$$anonymous$$d of function Start()
Your answer
Follow this Question
Related Questions
How do i create mobile menus 1 Answer
Main menu touch input for android 1 Answer
simple android swipe controls for level selection? 1 Answer