Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

BvhImporterExporter (for Unity 3D)

Import/Export skeletons in Unity games during runtime using motion capture data saved in the Biovision Hierarchy format. · By Winterdust

Create Animation Clip

A topic by arbridge created Apr 29, 2024 Views: 52 Replies: 1
Viewing posts 1 to 2

Hello,

I recently purchased your Unity asset and successfully imported an external BVH file using the makeDebugSkeleton() function, which worked well. However, I encountered an issue when trying to create an animation clip with the makeAnimationClip() method and save this clip for use with the Animator Controller of a model I own. Here is the code I used:

The animation clip is created, but it appears to be empty. Could you please advise on how I might resolve this issue?

Thank you for your assistance.

Best regards,

arb

Developer

I've not tested using CreateAsset() and SaveAssets() with the returned AnimationClip since the tool is not intended to create regular assets (it's for loading BVH files every time the game runs). Currently I don't have a setup to perform testing on, but seems like you need to use SetDirty() to mark assets to be flushed with SaveAssets()?

However it's possible that the dynamically created AnimationClip is lacking something internally that Unity is expecting for assets imported the normal way, if that's the case the AnimationClip needs to be modified in some manner (outside the scope of the tool) before being saved. If the AnimationClip can't be fixed you could use prepareAnimationClip() to get a more raw version of the clip data in order to somehow put together and write a regular unity asset (using the PreparedAnimationClip.CurveBlock struct).