- Home /
Touch menu for android
hi guys i got this good piece of code for pc but now i don't know at all how this should be made for android, i tested on my android device and it doesn't do anything, could someone say what i should change so that it would work on an android device? ty in advance
-------Code---------
var isQuitButton = false;
function OnMouseUp()
{
//quit button?
if(isQuitButton)
{
//quit
Application.Quit();
}
else
{
//load level
Application.LoadLevel(1);
}
}
Comment
Best Answer
Answer by dragonikus · Apr 03, 2012 at 11:34 AM
public var quitRect : Rect;
function OnGUI()
if(GUI.Button(quitRect,"Quit"))
{
Application.Quit();
}
where should i paste it, because it gives me errors btw is it c# or java?