Skip to main content

TransformAnimator

TransformAnimator controls named transform states on a GameObject with a Transform Animator component. It is separate from imported skeletal Animator, concurrent scene Animation, and exclusive Timeline playback.

MethodReturnsDescription
TransformAnimator.Play(gameObjectId[, state])booleanStarts playback, optionally selecting a state.
TransformAnimator.Stop(gameObjectId)booleanStops playback.
TransformAnimator.IsPlaying(gameObjectId)booleanReads playback state.
TransformAnimator.SetSpeed(gameObjectId, speed)booleanSets playback multiplier.
TransformAnimator.SetState(gameObjectId, state)booleanSelects an authored state.
TransformAnimator.GetState(gameObjectId)string or nilReads the selected state.
function Open(gameObjectId)
TransformAnimator.SetSpeed(gameObjectId, 1.0)
if not TransformAnimator.Play(gameObjectId, "Open") then
Log.Print("Open state is unavailable")
end
end

A scene supports at most 32 Transform Animator components and four states per component. Validation blocks over-budget state data before packaging.