If I import an animation from Maya, it comes in as read-only and you can't use the Unity Editor to add Animation Events to it (yes you can "copy" the anim and add events to the copy, but that's a nightmare to maintain).
Is there any way to add AnimationEvents (or anything that could be interpreted similarly) from within Maya so that they appear on read-only animations?
Is there any way of programmatically adding AnimationEvents to imported animation (possibly via a script)?
Sure, what you need is AnimationClip.AddEvent and AnimationEvent. But be careful, you add the event to the animationclip not to an instance of this clip. When you have two or more instances of your model you should add your events only ONCE because they are shared between all models that uses this animation.
You can maintain your own external solution like storing the events in a txt file and parse it at Start().
answered Nov 23 '11 at 12:47 PM