Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Animation CrossFade Help Missing Method

$
0
0
Ok, so i have my animations and there on my model and the script is on there but when i play i get an error : **MissingMethodException: UnityEngine.Animation.CossFade** var PlayerState : float; var PlayerAnimSec : GameObject; function Update () { PlayerStateController (); PlayerAnims (); } function PlayerStateController () { if ((Input.GetAxis("Vertical") !=0 || Input.GetAxis("Horizontal") !=0)) { if (Input.GetButton("Sprint")) { PlayerState = 2; } else { Playerstate = 1; } } else { PlayerState = 0; } } function PlayerAnims() { if (PlayerState == 0) { PlayerAnimSec.animation.CossFade("Idle Animation", 0.4); } else if (PlayerState == 1) { PlayerAnimSec.animation.CossFade("Walk Animation", 0.4); } else if (PlayerState == 2) { PlayerAnimSec.animation.CossFade("Sprint Animation", 0.4); } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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