# DialogueReference

Class in [Yarn.Unity](https://docs.yarnspinner.dev/api/csharp/yarn.unity)

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()](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference..ctor-1)                   | Creates an empty dialogue reference.                             |
| [DialogueReference(YarnProject,string)](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference..ctor-2) | Creates a dialogue reference with a given project and node name. |

## Fields

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

## Properties

| Name                                                                                                                            | Description                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| [IsValid](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguereference/yarn.unity.dialoguereference.isvalid) | 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. |
