# DialogueReference

Class in [Yarn.Unity](/api/csharp/yarn.unity.md)

Inherits from `System.Object`

## Summary

Stores a reference to a dialogue node in a Yarn Project.

```csharp
public sealed class DialogueReference
```

## Remarks

A Dialogue Reference is a reference to a named node inside a given Yarn Project. This allows the editor to warn the user if node doesn't exist in the specified project.

## Constructors

| Name                                                                                                                                 | Description                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| [DialogueReference()](/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference..ctor-1.md)                   | Creates an empty dialogue reference.                             |
| [DialogueReference(YarnProject,string)](/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference..ctor-2.md) | Creates a dialogue reference with a given project and node name. |

## Fields

| Name                                                                                                     | Description                                          |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [nodeName](/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference.nodename.md) | The name of the dialogue node in the project.        |
| [project](/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference.project.md)   | The Yarn Project asset containing the dialogue node. |

## Properties

| Name                                                                                                   | Description                                                                                                                            |
| ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| [IsValid](/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference.isvalid.md) | Gets a value indicating that this reference is valid - that is, the project and node name are set, and the node exists in the project. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguereference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
