A workaround to still use SkeletonMecanim
for normal game logic (when not controlled by Timeline) would be to use a dual approach. You could create a twin of your SkeletonMecanim
skeleton which uses the SkeletonAnimation
component. You then enable the SkeletonAnimation
GameObject and disable the SkeletonMecanim
GameObject whenever you switch to Timeline controlled mode, and vice versa when switching back out of Timeline mode.
If you don't want to use two GameObjects, you could also remove DisallowMultipleComponent
from SkeletonRenderer.cs
and add a SkeletonAnimation
component to the same GameObject. Then you would enable and disable single components instead of GameObjects. In general that's not much of a difference.
Unfortunately the above approaches can result in rather abrupt changes in bone position when switching from SkeletonAnimation
to SkeletonMecanim
or back, since transitions can only be performed when using only SkeletonAnimation
in both normal gameplay and Timeline control. This could however be countered by using the same unified animation pose when transitioning to and from Timeline. Like always enabling Timeline when arriving at the last frame of e.g. an idle
animation, and starting the Timeline with an animation that starts with the same pose.