animation - How play an AnimationClip in Unity3d? -
in unity 3d, model has add together component animator plenty data.
i animationclips animator's runtimeanimatorcontroller
just this:
animatoroverridecontroller aoc = new animatoroverridecontroller ( ); aoc.runtimeanimatorcontroller = seletedrole.getcomponent<animator> ( ).runtimeanimatorcontroller; if ( acp.overrideclip != null ) { anilist.add (acp.overrideclip); editorguilayout.labelfield ( acp.overrideclip.name ); if ( guilayout.button ( acp.overrideclip.name ) ) { aniname = acp.overrideclip.name; //seletedrole.getcomponent<animator> ( ); //seletedrole model } } if(acp.originalclip!=null) { anilist.add ( acp.originalclip ); if ( guilayout.button ( acp.originalclip.name ) ) { aniname = acp.originalclip.name; //animator animator=seletedrole.getcomponent<animator> ( ); } }
how create model play clip,when click on its' name ?
animation unity3d objectanimator
No comments:
Post a Comment