# BuildPreviewGraph(PlayableGraph, Playable)

> Appends custom Playable nodes to the Animation window PlayableGraph.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Animations](/engine/6000.5/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
Playable BuildPreviewGraph(PlayableGraph graph, Playable inputPlayable)
```

### Parameters

**** (\[PlayableGraph]\(/engine/6000.5/script-reference/unityengine/playables/playablegraph)): The Animation window [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md).**** (\[Playable]\(/engine/6000.5/script-reference/unityengine/playables/playable)): Current root of the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md).

### Returns

| Type                                                                          | Description                                                                                                          |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) | Returns the new root of the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md). |

### Remarks

The Animation window calls this function when it samples an [AnimationClip](/engine/6000.5/script-reference/unityengine/animationclip.md) for the first time. **Note:** This does not support legacy Animation clips.
