Quantcast
Channel: Answers by "belvita"
Viewing all articles
Browse latest Browse all 91

Answer by belvita

$
0
0
**Put the code below inside Update function havent tested the code but it should work** public GameObject mygameobject; if(Input.GetKey("w")) { if(!mygameobject.animation.IsPlaying("urWalkAnimationName")) { mygameobject.animation.Play("urWalkAnimationName"); animation["urWalkAnimationName"].speed= 0.4f; } } if(Input.GetKey("r")) { { if(!mygameobject.animation.IsPlaying("urRunAnimationName")) { mygameobject.animation.Play("urRunAnimationName"); animation["urRunAnimationName"].speed= 0.4f; } }

Viewing all articles
Browse latest Browse all 91

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>