---
title: "init(automaticallyPlaysDefaultAnimation:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/animationlibrarycomponent/init(automaticallyplaysdefaultanimation:)"
---

# init(automaticallyPlaysDefaultAnimation:)

Creates an empty animation library.

## Declaration

```swift
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 doc://com.apple.RealityKit/documentation/RealityKit/AnimationLibraryComponent/automaticallyPlaysDefaultAnimation for details.

## See Also

### Configuring default playback

- [automaticallyPlaysDefaultAnimation](realitykit/animationlibrarycomponent/automaticallyplaysdefaultanimation.md)
- [init(animations:automaticallyPlaysDefaultAnimation:)](realitykit/animationlibrarycomponent/init(animations:automaticallyplaysdefaultanimation:).md)
- [init(dictionaryLiteral:automaticallyPlaysDefaultAnimation:)](realitykit/animationlibrarycomponent/init(dictionaryliteral:automaticallyplaysdefaultanimation:).md)
