Hi
I have a GUITexture (say TexA) on the screen. I am using it as a button - as soon as I click on it, Id like to display another texture, say TexB, (as a popup button) on the screen. Here are the 2 scripts I have with the error-code included:
//Script1: Attached to TexA
var TexA: GUITexture;
var pop : GameObject; //pop is linked to TexB
function Update()
{
for ( var evt1 : iPhoneTouch in iPhoneInput.touches )
{
var texTrue = TexA.HitTest(Input.mousePosition);
if( evt1.phase == iPhoneTouchPhase.Ended || evt1.phase == iPhoneTouchPhase.Began )
{
if( TexTrue )
{
pop.active = true; //THIS LINE CAUSES SCREEN TO HANG
}
}
}
}
//Script attached to TexB
function Start () {
gameObject.active = false;
}
The error line causes the screen to hang. I am not sure what I am doing wrong here.
Thanks
Bi