skeleton:getTrackEntry()¶
Type:
functionSee also: skeleton, trackEntry
Overview¶
Returns the currently active trackEntry for a track.
Returns nil if the track has no active animation.
Syntax¶
local trackEntryOrNil = skeleton:getTrackEntry(trackIndex)
Parameters¶
trackIndex(required):number– 1-based track index.
Return value¶
trackEntry or nil– Active entry for the track, ornil.
Example¶
local entry = spineboy:getTrackEntry(1)
if entry then
print("Current animation:", entry.animation)
end