playAnimation(_:transitionDuration:startsPaused:)
Plays the given animation on the entity.
Declaration
@discardableResult @MainActor @preconcurrency func playAnimation(_ animation: AnimationResource, transitionDuration: TimeInterval, startsPaused: Bool) -> AnimationPlaybackControllerParameters
- animation:
The animation to play.
- transitionDuration:
The duration in seconds over which the animation fades in or cross-fades.
- startsPaused:
A Boolean that you set to
trueto return from the call with the animation paused. Set tofalseto start the animation right away.
Return Value
An animation playback controller that you can use to start and stop the animation.
See Also
Animating an entity
availableAnimationsplayAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:)playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:handoffType:)stopAllAnimations(recursive:)defaultAnimationClockparametersEntity.ParameterSetplayAnimation(named:transitionDuration:startsPaused:recursive:)bindableValuessubscript(_:)