View Full Version : Event Keys on animations created in Max???
So I am messing around with adding custom events to my animations that I bring in from Max. I cant add event keys in unity directly to the animations fbx since they are read only, I can get around this by making a copy of the animation file and removing it from the fbx. That is fine until I need to tweak that animation and import a new fbx from max, however then I am stuck going through and adding those event keys again.
Is there a better way of dealing with the back and forth of event keys between max and unity?
03-31-2012, 04:58 AM
What we do is we write various AssetPostProcessors (http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.html) that "automatically" set up the extra stuff for us.
The interesting bit about the "readonly" on imported animations is, during the import process it's perfectly valid to mess with them. When you do your tweaks in max and reimport the animation, the post processor will just get run again and recreate your events or whatever else you're doing with it.
What we do with events is we create them based on an external file, but you could set it up to do it based on information in the FBX if you needed to.
You can also do a lot of other nifty things with AssetPostProcessor btw. Delete useless nodes, add colliders or scripts to objects, etc, etc. Very useful, definitely worth the time it takes to figure it out. :D
Yea that definitely sounds like the way to go. I will have to do some research, thanks for the info :).
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.