I'm very sorry! I missed your attachments in the first post. I tried the exports in the "Animation" and "AnimationCleanUp" folders with the 3.8.99 Skeleton Viewer and the animations render exactly the same.
Looking at your code, the problem is this line:
m_SkeletonAnimation.AnimationState.ClearTracks();
See TrackEntry clearTracks
:
Removes all animations from all tracks, leaving skeletons in their current pose.
You are playing the idle
animation, then clearing all tracks, leaving the skeleton in the idle
animation pose. You then play the appear
animation, which will only pose the skeleton for the timelines it has. appear
doesn't key all the same timelines that idle
does, so some of the skeleton pose is left in the idle
pose.
The problem is as Harald said: when you use animation clean up, it removes keys for the setup pose. Normally this is not a problem, but you have left the skeleton in the idle
pose by using ClearTracks
.
You could use SetToSetupPose
after ClearTracks
. However, there is no reason to call ClearTracks
at all. You can just call SetAnimation
to play appear
. AnimationState handles resetting everything back to the setup pose when an animation (idle
in this case) will no longer be applied.