x


Touch Button Android Help!

I put this script in the Button and Cube to Play the Cube animation when the button be touched, is a touch button script. What is Wrong, is not working. _________________________________________________________________________

var btnTexture : Texture; function OnGUI() {

if (!btnTexture) { Debug.LogError("Please assign a texture on the inspector"); return; } if (GUI.Button(Rect(10,10,50,50),btnTexture)) Debug.Log("Clicked the button with an image"); animation["Play"].speed= 1.0; animation.Play("Play"); } function ResetAnimation(curAnim : AnimationState) {

yield WaitForSeconds(curAnim.length); animation.Play("Idle"); } ________________________________________________________________________ alt text

PLay.jpg (56.2 kB)
more ▼

asked May 11 '12 at 08:14 PM

gringofx gravatar image

gringofx
-10 14 25 25

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2451
x1937
x576

asked: May 11 '12 at 08:14 PM

Seen: 575 times

Last Updated: May 11 '12 at 08:55 PM