- Home /
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"); }
PLay.jpg
(56.2 kB)
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Problem with touch button (when moved) 2 Answers
HELP - Touch and Drag with Android using JS 0 Answers
eulerangle not work with joystick 0 Answers