I'm working on support for animation of mouth movements. The animator needs to be able to watch the mouth movement animation while listening to the audio sample. How can I support this in the Unity editor? It's easy to program a GUI button to play the audio sample, but how do I play the animation in the editor?
Here are some approaches I've considered and couldn't make work:
and here are some approaches I'm still considering:
What's the best approach? Is there a better idea that I've missed?
(A similar question, but no answers: Play animations in editor.)
Your first idea is closest to the answer, but a little bit overcomplicated. Just set appropriate time on animation state(s) and call Animation.Sample.
answered Mar 21 '11 at 09:00 AM
It seems that animation.sample doesn't work, but if you call gameObject.SampleAnimation(clip, time) then it works fine in editor mode.
answered Jul 12 '11 at 02:32 PM