UnityEditorInternal mecanim

Hi,

Currently I am creating an editor script to merge animator controllers in case two people are editing the same animator controller and commit them via whatever version control they use.

As well the ability to create a base animator controller and then press a button to create a new animator controller copying everything from the base animator controller.

So far I am able to copy all state machines, states with motions (animations only) and transitions except for two objects:

The LayerStateMachine and the BlendTrees (motions).

I can create a new StateMachine and a new BlendTree and set them but this wont work because it is being set in the editor and when press play these become invalid pointing to None.

My questions is there a way to create a deep copy of the BlendTrees and the statemachine for the LayerStateMachine. If there was only a function in the State class saying “CreateMotion” and the AnimatorController class containing a function called “CreateLayerStateMachine”.

Also in the future will all this functionality in the UnityEditorInternal be available just in UnityEngine?

thanks for reading

I think I am having the same problem with the others posts like so:

http://forum.unity3d.com/threads/107831-EditorWindow-loses-reference-of-ScriptableObject-on-Play-mode

and the way to get around it is by Unity Blog

but I am unable to do the following link above because the BlendTree is a unity class.

Any ideas?

We will add full API support to create controller in a future release

Best Regards,
Sonny

Hi, I only want to make the animationClip change immediate when click one button,it is easy to do in old animation system by using

animation.play[“xxx”];how to do in mecanim by script? I can not make this…,the animation changed can not immediatly,always will wait next frame!