My animation is not playing and I'm using this script on my guns so It can get mixed up so I decided to do variables so the animations didn't get mixed But I do get this error:
MissingMethodException: UnityEngine.AnimationClip.Play
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher ()
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.Create ()
Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object[] args)
Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object[] args)
Boo.Lang.Runtime.RuntimeServices+c__AnonStorey15.<>m__9 ()
Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.Invoke (System.Object target, System.String name, System.Object[] args)
UnityScript.Lang.UnityRuntimeServices.Invoke (System.Object target, System.String name, System.Object[] args, System.Type scriptBaseType)
Animations.Update () (at Assets/skripts/Animations.js:7)
And I'm using this simple code:
var Aim : AnimationClip;
var Idle : AnimationClip;
var Run : AnimationClip;
function Update(){
if(Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.W))
Run.Play();
else if(Input.GetMouseButton(1))
Aim.Play();
else
Idle.Play();
}
How can I fix this?
Sorry for my simple question. I'm pretty much a noob in these things.
↧