How do I use a GUI Texture object detect finger tap on touch app that loads new level?
Look into touches:
Then you can test whether the touch is within the bounds of your GUITexture.
I found this that would be useful too.
http://www.unifycommunity.com/wiki/index.php?title=FingerManager
If you place colliders behind where the GUITexture lives then the above script could work
I have seen some examples using a hit test ,any ideas
Use the touch.position instead of Input.mousePosition:
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
public void Awake() {
if (Physics.Raycast(ray, 100))
print("Hit something");
}
}
I have looked for simple examples for a tap button for itouch
I looked at the penelope example it uses gui texture and refers to hit test and touch
I understand javascript
I had a further look and found an old tutorial some of the commands have been changed
http://www.into-games.com/sledgenet/unity-iphone-quickstart-button-tap/
thanks for your help
Thanks buddy, you taught me something. Awesome ![]()