Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I saw in your demo that I can create an animation clip out of BVH file. So my questions are: 1) Is there any way that I can store it into unity assets? 2) Can I apply the clip to my animation controller? If yes, how?

1) There might be a way but right now I haven't implemented such a feature. I can see how it would be useful though and will be looking into it if I make an update! It's likely it will be an editor-only feature though and not not available in the demo.

2) Using the Mecanim system is possible but not simple. You have to create an Animator Controller in Unity and set it up with dummy animations, which means no previews (make blank states, set their motion to any AnimationClip you've got in your project). You also prepare an Animator Override Controller (AOC). Then during runtime you replace the original dummy clips in the AOC with the real ones created using BvhImporterExporter ("bvh.makeAnimationClip(pathToSkeletonGO:"MySkeletonGOName", legacy:false);"). Finally you instruct the Animator to use the override ("myAnimator.runtimeAnimatorController = AOC;").

Sticking with legacy might be just as simple or even simpler unless you intend to do some advanced stuff. The legacy Animation system is not deprecated even though Mecanim has been around since 2012 when Unity 4.0 was released. After trying to work with Mecanim from code I understand why, the Animation system has better access from code so Mecanim isn't a replacement (yet at least). I haven't for example found a way to create an Animator Controller from scratch via code during runtime, it seems to be an impossible task outside the editor.