I’ve read all the documentation and as many answers as I can find and I haven’t found the answer that works. I’m looking for the Android mobile command for OnMouseDown()(in Javascript). My first page menu has GUIText that says “Play” “Restart” Quit " etc… and I’ve used the OnMouseDown() function. Does anybody know how to convert this to an Input.GetTouch function or what ever the converted code is for OnMouseDown() when using an Android mobile phone? What is the correct command function? thanx
Here’s one of my scripts
var normalTex : Texture2D;
var hoverTex : Texture2D;
function OnMouseEnter() {
guiTexture.texture = hoverTex;
}
function OnMouseExit(){
guiTexture.texture = normalTex;
}
function OnMouseDown(){
Application.LoadLevel("sk6");
Time.timeScale = 1;
}
Thank you. It worked. Slow response but it works. Thanks again.
– DFiableIs this part of the OnGui package? If so this is not optimized for mobile devices (OnGui calls multiple times each frame, which eats up cpu), maybe try a guiTexture. I know that is better for mobile devices, but I'm looking into how to use it.
– 1337GameDev