Question by
9900 · Nov 23, 2017 at 02:07 PM ·
gui button
unable to play aanimation using gui button please help am just a beginner
Script 1
function OnGUI() { var iswalkingpressed : boolean; var anim : Animator; anim = GetComponent("Animator");
if( GUI.Button(Rect(300, 300, 90, 20), "attack")); { anim.SetBool("iswalking", iswalkingpressed); } } function OnGUI() {
var anim : Animator; anim = GetComponent("Animator");
var iswalkingpressed : boolean = GUI.Button(Rect(300, 300, 90, 20), "attack"); { anim.SetBool("iswalking", iswalkingpressed); } } i tried using both but nothing happens am trying to build an simple game in android platform..my code could be totally stupid as am an beginner thanks in advance ..
Comment
Your answer
