- Home /
Question by
xxzackly · Oct 21, 2016 at 05:15 AM ·
animationanimatorscript.animator controlleranimation controller
Trying to learn Java Script but having some issues...with this code.
I would like to ask for help on this code i've spent two days trying to make it work properly the error is;
MissingMethodException: UnityEngine.Animator.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+<Invoke>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)
AnimMovement.Start () (at Assets/Scripts/AnimMovement.js:13)
and the code is;
var Idle : boolean;
var a : boolean;
var d : boolean;
var moveleft : AnimationClip;
var moveright : AnimationClip;
var idle : AnimationClip;
//functions
function Start ()
{
Animator.play("idle");
}
function MoveLeft ()
{
if (Input.GetKeyDown("a"));
{
a = true;
}
}
function MoveRight ()
{
if (Input.GetKeyDown("d"));
{
d = true;
}
}
function UpdateMoveLeft ()
{
if (Input.GetKeyUp("a"))(Idle)=true;
}
function UpdateMoveRight ()
{
if (Input.GetKeyUp("d"))(Idle)=true;
}
any help would be appreciated, Thank you in advance.
Update I figured out what was wrong but now that the error is gone the animations won't play? Thanks again.
Comment