Dialogue system by Marcus Aas Jensen.
This dialogue system is a versatile tool integrated to Unity's engine to build story based interactions in a video game.
Note
I'm not a professional at building Unity tools, I simply share tools I initially build for myself to create my own games.
dialogue_system.mp4
You can watch the demo on Youtube too: https://www.youtube.com/watch?v=QhQQnyrjZJc
What's possible to create with this dialogue system:
- Create branching dialogues with dialogue choices using the integrated Dialogue Graph Editor.
- Dialogue path save system.
- Have different characters in a dialogue with each the possibility to change sprite, voice (sound, pitch), reactions, and emotion.
- Text typer with control over typing pace in play mode.
- Character speaker to control current character's "voice" (one sound repeated) with typer synchronization and default pace.
- Add multiple "command" tags to different text of the dialogue to have more control over storytelling.
- Workflow based on scriptable objects (save & load).
Important
Software and packages:
-
Unity 2022.3.0f1
-
TextMeshPro 3.0.6 (dialogue UI's text)
![branching](https://private-user-images.githubusercontent.com/88457743/292880158-ac28e200-bd49-40a4-91d3-9c62c258ffa7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAxNTgtYWMyOGUyMDAtYmQ0OS00MGE0LTkxZDMtOWM2MmMyNThmZmE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkMjgzYjNhZWFiOGI0ZDQxMjJjYmYxMzJiZDE0ZWM4ZTMyNzVkMjVhYzY3ZDVmZTA1MDkzY2JjYTFlYWE4ZWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.n_QfmjXFkthbIQUPDa2WW1IIQJ00rhWzddr8Ho_ZjQA)
Open the Dialogue Graph Editor window in the top menu "Graph > Dialogue Graph Editor".
You will see a blueprint with a menu at the top. The only existing node is the "START" node which is the node that directs where the dialogue should start.
A simple node is a visual representation of a dialogue composed of a list of messages. It can start from other nodes and you can connect it to a single other dialogue node.
![simple_node](https://private-user-images.githubusercontent.com/88457743/292880202-fa763645-dc3e-480a-89f5-327536516219.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAyMDItZmE3NjM2NDUtZGMzZS00ODBhLTg5ZjUtMzI3NTM2NTE2MjE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlMWEyYTZjZDA3NmJmMzg2ZjUwZTE2Y2Q1MjkwNjM3ODE0OGNhMTRiOWFkNzdjZDE1NWYxMDgzNmY5YzViMzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fIOFVYOEk07CxsFvR-fX8NP9qnmChh6aeS5C9Sz_Xow)
Create a simple node in the top menu with the button "Create Simple Node". A simple node will appear on the blueprint. This node is composed of a disconnected input port, an empty dialogue, and a disconnected output port.
You can connect the START node to the simple node by dragging your mouse click from the start node port named "Next" to the simple node's input port. This indicates the dialogue will start the simple node's dialogue at the very beginning of the narration. Now, you know how you can build a chain of nodes by creating and connecting outputs to inputs. Also, it is possible to close the dialogue UI and reopen it at the next interaction using the option at the bottom of the simple node.
![connected_simple_node](https://private-user-images.githubusercontent.com/88457743/292880343-bfd96002-299b-468f-ab53-4b5a859f2062.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAzNDMtYmZkOTYwMDItMjk5Yi00NjhmLWFiNTMtNGI1YTg1OWYyMDYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4Njc4MzUyMzk0ZWNlY2E4YWI0Y2IwYWNkMWM3MzA1NWJkN2UxY2Y5OTk3MWQxYjE4ZmEwNzM4NjE5NTBjZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EKEyYXJqdv6BhlQiZ4oYCRxtygx_VnNQp_8JFXt8Mw0)
A multiple choice node is a simple node with multiple possible outputs. Each outputs has a text and must be a path to another node. Basically, when the player enters a multiple choice node, he will have to choose between the different text options.
![mutliple_choice_node](https://private-user-images.githubusercontent.com/88457743/292880301-640af5d2-931b-4de8-8675-6339854c3413.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAzMDEtNjQwYWY1ZDItOTMxYi00ZGU4LTg2NzUtNjMzOTg1NGMzNDEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1MTdmYzEwOGFjYWExMTA2NjAyNDM5N2Y0ZWY1ZmRjN2E2YjYxMjQ1NzMyODUyODlhNjQ5NDNhNGExOTNmNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jsYJfBewnxZv57vZp9UE2fhn0M6HeCwxP-uXDRVB_Ik)
Create a multiple choice node in the top menu with the button "Create Multiple Choice Node". A multiple choice node will appear on the blueprint. It is similar to the simple node. You can add an option using the "New Choice" button. Then, an option appears inside the node. Now you can edit the text and connect its port to other nodes. You can add up to 5 choices (otherwise it is too much). Also, you can remove it using the "Remove" button next to the option.
At the end of the dialogue, it will automatically show the options you added. However, an option must be connected to another node, otherwise, it will be removed on save. In case the player goes back to the same node, it is possible to disable already chosen options at the bottom of the node.
Edit the dialogue of a specific node by clicking on the "Edit Dialogue" button of the node. This will open a new window presenting an empty list of messages.
![messages](https://private-user-images.githubusercontent.com/88457743/292880368-2087467c-32af-451d-8539-57638e405cb0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAzNjgtMjA4NzQ2N2MtMzJhZi00NTFkLTg1MzktNTc2MzhlNDA1Y2IwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxZjBmNTE3MWI0NmQwZTkwZDlkYmQ5N2VlMWE2ZmVlMmNiM2Y0NTJhYmZkYzc4MTM3YjVkZjIxNTBiYTM4MjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.slcLGYmaf9piSIUp4AGnAvfxlQjRsRJjGSvEOZ4lX7g)
Add a new message to the list. Then you can write the character's name, the message to show, add the command tags (see how to use them in the Command tags section) with the option of showing or not the character ("Hide Character"). Make sure to write correctly the character's name or the dialogue system will not know which character is speaking. If the message list is empty, it will close the dialogue at that node or show the possible choices for the case of a multiple choice node.
You can close the dialogue messages window to save.
To save your narrative, you must write the name of your file in the top menu. Then, you can save by clicking on the "Save data" button. All of your narratives will be saved in the path "Assets/Resources/Dialogue System Data/Narratives/". You can load an existing narrative from the resource path by writing the file's name and clicking on the "Load Data" button in the top menu.
Before testing your narrative, open your narrative scriptable object's inspector and list all the characters present in your narrative.
![narrative](https://private-user-images.githubusercontent.com/88457743/292880399-e31a0192-8ffc-40d6-b7a8-2a1318f3366d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODAzOTktZTMxYTAxOTItOGZmYy00MGQ2LWI3YTgtMmExMzE4ZjMzNjZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmYTJlZDVkMjJjODk3NTQyOGUzMzQ0ZTI2N2M2NzVkNjMwODM3MTA1N2U5YzE3MmJjZThiZTRiMzUxNDZlNGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Vkfb9Gqfy9HoVxCz_vY9XGTZBlycR41jo_gBKrNo7II)
The "Path To Checkpoint" property is the path that will be created when the player makes choices in the narrative. You can use its value or remove it to reset the narrative.
"Is Narrative End Reached" is also an option you must reset if the player has reached the end of the narrative and that you want to reset it for testing.
"Start From Previous Narrative Path" is an option when the player closed the dialogue and reopens it to start from where he left off.
Do not hesitate to use the scene templates I have provided in the project. Every time you save your narrative, you will need to reference it to a GameObject's component inheriting from the DialogueMonoBehaviour class. You can use DialogueStarter GameObject to start immediately the dialogue or the Character GameObject (InteractableDialogue) where you need to interact with the character (Interactable) to start. You must test in Play Mode.
Caution
Make sure to fully respect the tag notations and examples here. Otherwise, you may encounter unwanted behaviours.
Invokes the event associated with a certain name you have defined in a dialogue monobehaviour that uses the narrative.
Replace the onevent
text by the name of your event you have previously defined (name as a string).
"Something is happening...<event:onevent> That was strange!"
Here is a script that extends the class DialogueMonoBehaviour that allows the player to interact with a character. Then you can define your event at runtime in the script with the name you have used in your tag.
![image](https://private-user-images.githubusercontent.com/88457743/305387283-00627acb-c2a1-44a8-83d5-c3b7815f2a50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8zMDUzODcyODMtMDA2MjdhY2ItYzJhMS00NGE4LTgzZDUtYzNiNzgxNWYyYTUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1OGViYjY3MzNiMjMyMzA2N2MwZmEwMGUxM2RhNTcwMTdlNjVkNDYzNDM5NGE3NDAxOWM0NjViMTdiNmQ2NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oZPdRB_NqKs5nFlBVnq4aLfjC1XvLsQYdEwAMYZ_GHY)
Pause the text typer for a certain time.
Replace the pause
text by one of the following pause types.
tiny: 0.1s
short: 0.25s
normal: 0.666s
long: 1s
read: 2s
"Wait... <p:normal> You're kidding right?"
Changes the typer text's speed, otherwise the speed is the default typer pace.
Replace the speed
text by a real number.
The lower the value, the faster the typer.
"PLEASE <sp:0,1>I BEG YOU!"
Animates the text in between by the provided animation and the default text animator speed, amount and sync values.
Here is a Wobble animation example...
Replace the animation
text by one of the following animation types.
None
Shake
Wobble
Wave
PingPong
Flicker
Spiral
Jitter
Warning
Make sure the AnimatorText component has a direct reference to the TextMeshPro text showing the character's message.
Tip
It is possible to use the TextAnimator component to test your animation values on the default text message in Editor Mode. Make sure to disable animation testing before entering Play Mode.
When you have decided the values to use in your dialogue, you can add other parameters in your tag:
<anim:animation a:amount s:speed>...</anim>
speed
is the speed of the animation (real number).
amount
is how much the animation is exagerated (real number).
<anim:animation a:amount s:speed sync:synchronize>...</anim>
synchronize
is the animation synchronization of all letters in between (true or false).
"<anim:wobble s:1 a:2.5 sync:false>I'm feelin' dizzy right now...</anim>"
Changes the "emotion" of the current speaking character. The emotion must be defined in the Character's Scriptable Object in the list of character's states. If not defined, it will automatically use the default character's state that must be defined too.
![default_character](https://private-user-images.githubusercontent.com/88457743/292880510-82cc96bd-3be3-4937-9427-34c984ef9795.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODA1MTAtODJjYzk2YmQtM2JlMy00OTM3LTk0MjctMzRjOTg0ZWY5Nzk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk2ZmRkZGM3M2QzNzUxN2MzYmY4M2I4NWYyMWU4Yzc4NDU0Yjc0YWMwMDY5N2M3NzNhODU4MDk2NDY4NjBjYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KE5YztFI9KdqtfPLDDbcl2EmzMQuohhZsL32K1IaOnA)
Warning
Make sure to create the character scriptable object, define it's properties (unless it is optional), and reference it in the narrative scriptable object (character's list).
Make sure the default character scriptable object is well defined and is referenced in the NarrativeController component.
Replace the emotion
text by one of the following emotion types.
Default
Hidden
Happy
Neutral
Angry
Scared
Fearful
Sad
Disgusted
Annoyed
Surprised
Curious
Warm
Evil
When the tag is used, the character will have the associated character face sprite, reaction sound (plays one time), and speaking pitch. You will have to define each emotion with your own assets in the character's scriptable object.
"<em:evil>I am the danger."
Replaces the tag's position by a stored value named value
. The variable must be defined in the Scriptable Singleton "DialogueVariableData.asset". If not defined, the value will be "X"
. The variables can be of type int, float or string. Boolean variables are not included.
Warning
Make sure to have only one DialogueVariableData Scriptable Singleton in the directory "Assets/Resources/Dialogue System Data/".
You can manipulate these variables using C# script.
public class ExampleSceneScript : MonoBehaviour
{
private void Awake()
{
DialogueVariableData.Instance.RemoveAllDialogueVariables();
DialogueVariableData.Instance.AddDialogueVariable("cost_coffee", 1.5f);
DialogueVariableData.Instance.AddDialogueVariable("cost_bread", 1);
DialogueVariableData.Instance.AddDialogueVariable("character", "John");
DialogueVariableData.Instance.AddDialogueVariable("tmp", 0);
DialogueVariableData.Instance.RemoveDialogueVariable("tmp");
DialogueVariableData.Instance.ListAllDialogueVariables();
}
}
"This coffee costs exactly <val:cost_coffee>π²."
Resulting DialogueVariableData.asset values:
![dialogue_variables](https://private-user-images.githubusercontent.com/88457743/292880558-4b8f7fb4-a8d8-4a9f-973a-e170ed2f787a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODA1NTgtNGI4ZjdmYjQtYThkOC00YTlmLTk3M2EtZTE3MGVkMmY3ODdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4NjQ3YzNkYzU0NWMyM2JkZjNkM2ZjY2ViNGJmYmVjNTdmY2VlZGU3NTk5NWViOTc0NWY4NjExNjU3MzEyM2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BK-NfbP_p8Xi7E5l1x1rGA-w93EayB5ucfzg4Wv_Yzs)
Tip
It is possible to use this tag inside text options
"Pay <val:cost_coffee>π²."
Warning
Make sure to have only one DialogueAudioData Scriptable Singleton in the directory "Assets/Resources/Dialogue System Data/Dialogue/".
Make sure the AudioPlayer GameObject is in the scene with the AudioPlayer script attached. Each audio source property must have a reference (both music and sound).
![dialogue_audio](https://private-user-images.githubusercontent.com/88457743/292880616-8cbea8fa-ef95-4576-9b89-07dc0567ebfb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTc4NzEsIm5iZiI6MTcyNDcxNzU3MSwicGF0aCI6Ii84ODQ1Nzc0My8yOTI4ODA2MTYtOGNiZWE4ZmEtZWY5NS00NTc2LTliODktMDdkYzA1NjdlYmZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAwMTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiOTM0M2QxZjEzMDEwYThlMzk2ZDM0NjQ0NWRkMjllNWJlZTYxODFkMWU5YmZiYWJhNGM5ZWE2ZTAwZWY5NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Yb8Cp9KSa47f0qPFy7FjQqerkEWjs8o73597h0vCsfE)
Plays one shot the sound named sound
when the text typer arrives at tag's position. The Sound effect must be defined with a name in the Scriptable Singleton "DialogueAudioData.asset" (sound effect list).
"So I was saying...<sfx:fart> Woops, I farted."
Plays in loop the music named score
when the text typer arrives at tag's position. The music must be defined with a name in the Scriptable Singleton "DialogueAudioData.asset" (music list).
"<music:emotional>Life is like a box of chocolate..."
Stops any current looping music.
"*music playing*...</music>It's not your fault."
Of course, it is possible to use the default tags to customize your TextMeshPro text like colored, italic, bold, rotated etc.
The latest update was the Unity Event tag feature, which actually groups all of the functionalities I initially wanted to make. You can use any function on your Unity Events to execute Timelines, use your custom camera shakes etc. Hope you enjoy the system.