Any hint about Spine functions documentation?
13 Nov 2015, 09:48
Just some corrections to Pharan code here:
var currentTrack = skeletonAnimation.state.GetCurrent(0); // May be null if no animation is playing.
if (currentTrack != null)
currentTime = currentTrack.time;
currentFrame = Mathf.RoundToInt(currentTime * 30f); // convert seconds to Spine editor dopesheet "frames". Spine doesn't actually use frames.
if (currentFrame >= 3) startJump = true; //Here you can trigger things using currentFrame. Be aware that this is not precise, as the exact frame you aim for may have passed by the time you check it, thus the ">=".
I hope someone finds this useful 🙂