- Home /
android, button help
Hello, all I have a question about a button. I have made a script for a button, but it doesnt work. When i wana touch the button it has to go to the next scene. What function do i have to use then? I know how to make it go to the next scene. Ty, already.
Comment
Answer by whydoidoit · May 28, 2012 at 05:40 PM
If this is a GUI button then
if(GUI.Button("x")) {
Application.LoadLevel("whatever");
}
If this is a 3d object then:
Add a box collider
Write a function OnMouseDown() in the attached script
function OnMouseDown() { Application.LoadLevel("whatever"); }