Contents

init(automaticallyPlaysDefaultAnimation:)

Creates an empty animation library.

Declaration

init(automaticallyPlaysDefaultAnimation: Bool)

Parameters

  • automaticallyPlaysDefaultAnimation:

    Whether to automatically play the default animation when the entity is added to a scene and enabled. When true, the animation system plays the default animation automatically. When false, animations require manual playback. See Automaticallyplaysdefaultanimation for details.

Example

var library = AnimationLibraryComponent(automaticallyPlaysDefaultAnimation: true)
library.animations["walk"] = walkAnimation
library.defaultKey = "walk"
entity.components.set(library)

See Also

Configuring default playback