> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguerunner/yarn.unity.dialoguerunner.setproject.md).

# SetProject(YarnProject)

Method in [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md)

## Summary

Sets the dialogue runner's Yarn Project.

```csharp
public void SetProject(YarnProject project)
```

## Remarks

If the dialogue runner is currently running (that is, [IsDialogueRunning](/api/csharp/yarn.unity/yarn.unity.dialoguerunner/yarn.unity.dialoguerunner.isdialoguerunning.md) is `true` ), an `System.InvalidOperationException` is thrown.

## Parameters

| Name                                                                               | Description                                                                                                                  |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [Yarn.Unity.YarnProject](/api/csharp/yarn.unity/yarn.unity.yarnproject.md) project | The new [YarnProject](/api/csharp/yarn.unity/yarn.unity.dialoguerunner/yarn.unity.dialoguerunner.yarnproject.md) to be used. |
