touch in guiTexture
Posted
by
Mitananda
on Game Development
See other posts from Game Development
or by Mitananda
Published on 2014-06-22T13:25:33Z
Indexed on
2014/08/21
22:28 UTC
Read the original article
Hit count: 259
Before time in my game start. i want there will show a guiTexture.. if i touch this guiTexture, that will hidden and the time game will start. I try to make a script but it doesn't work. I'm a bit confused by the Unity documentation. please help me i'm newbie in Unity.
my code :
void Start () {
if (myGuiTexture.HitTest(Input.GetTouch(0).position))
{
if (Input.GetTouch(0).phase == TouchPhase.Began)
{
Time.timeScale = 1;
myGuiTexture.enable = false;
}
}
}
and i also create this source but its doesn't work too.
void Start () {
if (tutorial.HitTest(new Vector3(0,0,0))){
Time.timeScale = 1;
}
}
© Game Development or respective owner