# Sandbox.Animation.Graph

A compiled animation graph (.ag). Can be loaded from disk or created
procedurally with [Sandbox.Animation.GraphBuilder](/api/Sandbox.Animation.GraphBuilder).

- Kind: class
- Namespace: `Sandbox.Animation`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Resource](/api/Sandbox.Resource)
- Modifiers: sealed

## Properties

- [`AnimationSlotCount`](/api/Sandbox.Animation.Graph/AnimationSlotCount): Number of animation slots referenced by this graph. Slots are resolved against a model's animations by name at bind time.
- [`Builder`](/api/Sandbox.Animation.Graph/Builder): Build an animation graph at runtime, node by node.
- [`IsError`](/api/Sandbox.Animation.Graph/IsError): Whether the animation graph is invalid, or has not yet loaded.
- [`IsValid`](/api/Sandbox.Animation.Graph/IsValid)
- [`ModelName`](/api/Sandbox.Animation.Graph/ModelName): The model this variation was authored against.
- [`Name`](/api/Sandbox.Animation.Graph/Name): Animation graph resource name.
- [`Parameters`](/api/Sandbox.Animation.Graph/Parameters): Parameter descriptions exposed to tools. Undescribed parameters remain accessible at runtime.
- [`VariationId`](/api/Sandbox.Animation.Graph/VariationId): The variation of the graph this resource was compiled for. Each variation animates its own model and can give any node its own data, and is compiled into its own resource - so playing a variation is loading its resource, named "mygraph.ag+variation.ag".

## Methods

- [`Dispose`](/api/Sandbox.Animation.Graph/Dispose): Releases a graph built at runtime. Nothing else holds it - a renderer only keeps a weak handle - so disposing frees it right away instead of waiting for the garbage collector, which happens anyway if you don't. Only dispose a graph nothing is playing any more. Graphs loaded from disk are shared, so this does nothing for those.
- [`GetAnimationSlotName`](/api/Sandbox.Animation.Graph/GetAnimationSlotName): Name of the animation in the given slot.
- [`Load`](/api/Sandbox.Animation.Graph/Load): Load an animation graph from the given file.
