<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AnimationGraphComponent/init(graph:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23AnimationGraphComponentV5graphAcA0cD8ResourceC_tcfc"
  },
  "title" : "init(graph:)"
}
-->

# init(graph:)

Creates a component that drives skeletal animation on an entity using the supplied
compiled animation graph.

```
init(graph: AnimationGraphResource)
```

## Parameters

`graph`

The compiled [`AnimationGraphResource`](/documentation/RealityKit/AnimationGraphResource) that drives this
component.

## Discussion

Per-instance evaluation state initializes when the entity becomes active in a scene,
so accessors such as [`activeNodes`](/documentation/RealityKit/AnimationGraphComponent/activeNodes) return an empty array until the first
evaluation tick has run.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)