The **Harmony Dialogue System** simplifies the integration of interactive dialogues into Unity projects. With support for both 2D and 3D environments, this package enables developers to effortlessly create engaging dialogue between characters and players. It supports both Ink files (Using the Inky Unity System) and allows developers to make use of TXT files and other Text asset formats by either using the default system or easily developing their own parsing code.
The Harmony Dialogue System is compatible with Ink dialogue files and the Inky Unity integration system. However, these are **separate components** that require additional installation.
View the full documentation at [<https://kindhearted-fiber-243.notion.site/Harmony-Dialogue-System-b8bf355dd132413b806293c4fe8d5925?pvs=4>](<https://kindhearted-fiber-243.notion.site/Harmony-Dialogue-System-b8bf355dd132413b806293c4fe8d5925>).
Setup Prefabs:
Select Trigger Type:
SettingsType option that allows users to choose between two options for configuring trigger settings:
SettingsType dropdown:
Customize Dialogue Events:
Using other options to Initiate Dialogue:
Setup Ink System (Optional):
Attach Dialogue Data:
Initiate Dialogue:
It is key to note that each Dialogue Trigger and corresponding TXT or Ink File is for each Dialogue Moment. So a scene can have several Dialogue Triggers with as many TXT or Ink Files. Each Trigger is treated as a separate game Object on its own controlled by the Dialogue Manager.
This setup guide provides a streamlined approach to integrating the Harmony Dialogue System into your Unity projects. For advanced customization and usage scenarios, refer to the subsequent sections for in-depth explanations and examples on the full documentation at https://kindhearted-fiber-243.notion.site/Harmony-Dialogue-System-b8bf355dd132413b806293c4fe8d5925?pvs=4.
In order to customize the UI, Go to the Dialogue Prefab. It contains two things. Dialogue Panel (which is what is in charge of the UI aspect of the Dialogue and is what should be customized to suit whatever UI you wish to use for your project). Certain Key UI elements such as DialoguePanel, DialogueText, SpeakerName and Portrait are UI elements called by the Script by the Dialogue Manager Game Object.
The Dialogue Manager is a major part of the Harmony Dialogue system managing the states of dialogue. In situations that a user may not want to use a Collider Trigger to trigger dialogue. The dialogue offers a function called EnterDialogueMode that takes in the Text Asset file as well as the file type the text asset file is in (Ink or TXT for custom files). An example of the EnterDialogueMode is:
public void StartDialogue(TextAsset text)
{
DialogueManager.instance.dialogueSystemOnEvent += StartMoving;
DialogueManager.instance.dialogueSystemOffEvent += StopMoving;
DialogueManager.instance.EnterDialogueMode(text, FileTypeUsed.Ink);
DialogueManager.instance.ClearOffEvent();
}
Another example can be found in the Dialogue2DTrigger and 3DTrigger which make use of this function to start a dialogue.
Dialogue Manager also contains two Unity Actions called dialogueSystemOnEvent and dialogueSystemOffEvent that are called when the Dialogue starts and ends respectively. You can access these via code. An example of them being used is shown below:
public void StartDialogue(TextAsset text)
{
DialogueManager.instance.dialogueSystemOnEvent += StartMoving;
DialogueManager.instance.dialogueSystemOffEvent += StopMoving;
DialogueManager.instance.EnterDialogueMode(text, FileTypeUsed.Ink);
DialogueManager.instance.ClearOffEvent();
}
Dialogue Manager:
The **Dialogue Manager** Game Object within the Dialogue Prefab encapsulates essential scripts for managing dialogues.
Character Manager:
The **Character Manager** script facilitates the management of characters involved in dialogues.
Input Dialogue Manager:
The **Input Manager** script enables customization of input buttons for interacting with the dialogue system.
Characters play a crucial role in enhancing the flexibility and depth of interactions within the **Harmony Dialogue System**. Each character represents an individual speaker within a dialogue sequence, allowing for nuanced storytelling and dynamic interactions.
InvokeCharacter Function:LookForCharacterTag Function: Tags are dynamic markers embedded within dialogue text files or Ink files, providing additional context and functionality to dialogue interactions within the **Harmony Dialogue System**. By leveraging tags, developers can customize character behavior, appearance, and interactions on a per-line basis, enriching the storytelling experience.
#key:value.