After taking a closer look at the docs It seems to me that AnimationUtility.StartAnimationMode has more to do with saving the state of the objects so they can be reverted after stopping animation mode.
This might be useful, but I still haven’t gotten the animation to play, do I have to get the curves and sample them myself? Anyone know?
The whole thing is already inside an editor window so no need for [ExecuteInEditMode], everything seems to be working fine but the animation just doesn’t play, I figure this is because animation is time based and there is no time running in edit mode, but how does the animation window do it then?
Would you mind elaborating a bit on how you got it to work? Animation.Sample() doesn’t seem to cut it for me during edittime… what else is necessary? (setting the animation time, enabling it, what else?)