# Dialogue System for Unity

Dialogue System for Unity is a branching conversation system for Unity. It requires no scripting yet is designed to be easily extended by programmers, and has been used in games like Disco Elysium, Yes Your Grace Snowfall and many more.

<a href="https://prf.hn/l/7JOjQmj/" class="button primary">Get Dialogue System for Unity</a> *(affiliate link)*

***

## Integration Steps

{% hint style="info" %}
We have tested Text Animator 3.X with Dialogue System for Unity version **2.2.64.1**

It should work with all versions within Dialogue System 2.X, but if you notice that some breaking changes were introduced - please let us know!
{% endhint %}

All integration steps are written both here and in the PixelCrushers' documentation.

{% embed url="<https://www.pixelcrushers.com/dialogue_system/manual2x/html/text_animator.html>" %}

You can learn both via a [short video](#video-guide) or through the [text guide](#text-guide) below.

### Video Guide

{% embed url="<https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2Fff258LTw3nvqQgNfDjpp%2FTutorial%20Integration%20Dialogue%20System%20with%20Text%20Animator%203.mp4?alt=media&token=bd08b49b-1550-4996-942f-fe7be8f1aeaa>" %}

### Text Guide

{% stepper %}
{% step %}

#### Project Setup

**Step 1.** Make sure TextMeshPro is enabled in Dialogue System for Unity

<figure><img src="https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2Fm2SveaTFBG0i5J5b4XZv%2Fimage.png?alt=media&#x26;token=52de6122-aa2b-465c-83e8-f01f3a12e7a9" alt=""><figcaption></figcaption></figure>

*(Text Animator uses TMPro or UI Toolkit, so you can choose the one you prefer the most and the setup is similar for both)*

**Step 2.** Import the "Text Animator V3" support package from Dialogue System -> Third Party support.

<figure><img src="https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2FzS01Ns1TvaSY7woaRAvZ%2Fimage.png?alt=media&#x26;token=607d8cb3-318d-49d5-92fd-911482c423c1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Text Setup

For every text element of your Dialogue Prefab that you want to animate (e.g. NPC Subtitle):

* Ensure the base text component is `TextMeshPro` (and make sure to re-link any broken references in the UI panel).<br>

  <figure><img src="https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2FVYtLFkyMo4dL1az9mDQZ%2Fimage.png?alt=media&#x26;token=d7907b06-326a-4091-be8f-38100faeda6d" alt=""><figcaption></figcaption></figure>
* Add a `Text Animator` component to the same text GameObject.
* Add a the `Typewriter` component (if you want to use the typewriter).
  {% endstep %}

{% step %}

#### Replace the Standard UI Subtitle Panel&#x20;

Replace the `Standard UI Subtitle Panel` with `Text Animator Subtitle Panel` and make sure all references are up to date.&#x20;

<figure><img src="https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2Fid37170j6LLXDZvJvph0%2Fimage.png?alt=media&#x26;token=7b84f40e-693f-4203-b0bd-585b446e5a4b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Instead of manually deleting and re-adding components (which can break existing references), you could use the Debug Mode (top right dots in the inspector) to swap scripts more easily.

![](https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2FZHp1I0muPHUi5Ptfh4m8%2Fimage.png?alt=media\&token=74685410-140d-4405-b689-6df404c9fad4)
{% endhint %}
{% endstep %}

{% step %}

#### Replace the Continue Button

Replace the `Standard UI Continue Button` with the one designed specifically for `Text Animator` by PixelCrushers, called `Text Animator Continue Button Fast Forward`.

Also ensure the Typewriter component is correctly linked in the inspector.

<figure><img src="https://3857371675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2F3RzwkJ7vFATbVRDzoLOA%2Fimage.png?alt=media&#x26;token=b6a8f674-dab3-45e8-b0ae-ee3c11d4054f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

Enjoy! Have a look at [how-to-add-effects](https://docs.febucci.com/text-animator-unity/effects/how-to-add-effects "mention") and [show-and-hide-letters-dynamically](https://docs.febucci.com/text-animator-unity/typewriter/show-and-hide-letters-dynamically "mention") to quick start adding more effects to your dialogues.

{% hint style="info" %}
Please let us know if it's working how you expected and/or if you'd like any new feature or improvement!! Cheers!
{% endhint %}
