natiny.animator.get_animation

Lua
natiny.animator.get_animation(animator) -> animation

Returns the animator's current clip without changing playback state.

Parameters

Name Type Description
animator number Animator handle from natiny.animator.create

Returns

Type Description
number Animation handle, or nil when no current clip is assigned or a stale nonzero animator handle no longer resolves

Example

Lua
local clip = natiny.animator.get_animation(hero_legs)
if clip then
    print(natiny.animation.get_name(clip))
end