Are you talking about time accuracy?
For review, here's what happens every update on a SkeletonAnimation: spine-runtimes/SkeletonAnimation.cs at master
- get the delta time
Skeleton.Update
- actually does nothing in this version
AnimationState.Update
- progresses time in the AnimationState. Animations move forward in time.
AnimationState.Apply(skeleton)
- the animations are used to pose the skeleton. Local bone positions are changed. Spine user events fire here. Other properties like IK and draw order are also changed.
UpdateLocal callback
- this is where SkeletonUtility does its base local work.
Skeleton.UpdateworldTransform
- The world transformation matrices are updated according to all the transform local values.
UpdateWorld callback
- SkeletonUtility does some of its work here in the case of IK, or overrides. If this is used, Skeleton.UpdateWorldTransform is called again so the matrices can be updated and the skeleton renders correctly with the modified values.
UpdateComplete callback
- SkeletonUtility uses this if you have SkeletonUtilityConstraints.
Note that events fire in step 4. and Unity Transform values are updated in step 5. And bone world values are actually available in step 6.
If the captured time span encompassed both 1/30sec and 2/30sec, the event will have fired (during AnimationState.Apply) before the bone position is transferred from the internal Bone structure to the Unity Transform (SkeletonAnimation.UpdateLocal).
So to get bone world positions for a given frame, the recommendation is actually to do it with the UpdateComplete
callback, or in an Update that's specifically been set to be later in Unity's custom Script Execution Order. In any case, that access needs to be deferred until after the skeleton is done posing.
In your case, probably set a bool during the event callback, which gets checked and acted on during the UpdateComplete
callback.
This is good stuff for the docs, I guess. Maybe some functionality to consider for all runtimes.