First One Excuse My English And This Is My Email To Contact Me macroarcadeyt@gmail.com
My Animation Only Play One Time I put a script for animate it I put my 3D model in legacy with all animations in the script and in the “animation” (not in the animator) and it supose to make idle animation and then walk in circles but it only make the idle animation and it do it only one time why this?
Im desesperated pls answer me
PD I See a tutorial to make the script and in the tutorial function it perfectly, I use it in two diferent version of unity and it make the same error and I use like 3 or 4 diferent scripts
this is the error that appear in the console
MissingMethodException: UnityEngine.Animation.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)
IA.Nada () (at Assets/IA/IA.js:78)
IA.Update () (at Assets/IA/IA.js:51)
And this is the script:
//Estado var Estado : int = 0;
//Animaciones
var nada : AnimationClip;
var caminar : AnimationClip;
var correr : AnimationClip;
var atacar : AnimationClip;
var morir : AnimationClip;
//Valores
var pat : float= 0; var patu : boolean= true;
function Start () {
}
function Update () {
if (pat < 0){
patu= false;
estado= 0;
}
if (pat > 10){
patu= true;
estado= 1;
}
if (patu == true){
pat -= 1 *Time.deltaTime;
}
if (patu == false){
pat += 1 *Time.deltaTime;
}
if (Estado == 0){//nada
Nada ();
}
if (Estado == 1){//patrullar
Patrullar ();
}
if (Estado == 2){//perseguir
Perseguir ();
}
if (Estado == 3){//atacar
Atacar ();
}
if (Estado == 4){//morir
Morir ();
}
if (Estado == 5){//esquivar
Esquivar ();
} }
function Nada () {
GetComponent.<Animation>().play (nada.name);
}
function Patrullar () {
transform.Rotate (Vector3 (0,120,0)*Time.deltaTime);
transform.Translate (Vector3 (0,0,1)*Time.deltaTime);
GetComponent.<Animation>().play (caminar.name);
}
function Perseguir () {
GetComponent.<Animation>().play (correr.name);
}
function Atacar () {
GetComponent.<Animation>().play (atacar.name);
}
function Morir () {
GetComponent.<Animation>().play (morir.name); }
function Esquivar () {
GetComponent.<Animation>().play (correr.name);
}