This page describes how to set up the Dialogue System with Cinema Director. (Cinema Director is required.)
Cinema Director copyright © Cinema Suite.
To enable Cinema Director support in the Dialogue System, import the package Third Party Support/Cinema Director Support
.
This will add Dialogue System events and a sequencer command that plays Cinema Director cutscenes.
The Cinema Director Example in Scene
example scene starts a Cinema Director cutscene using the Cinema() sequencer command in a Sequence Trigger that starts when the scene starts.
The cutscene demonstrates how to show alerts and play conversation lines.
The Cinema Director Example in Resources
does the same thing, but it loads the cutscene from a prefab in a Resources folder. (This prefab was created in an earlier version of the support package; it doesn't include examples of showing alerts and playing a conversation line in the cutscene.)
You can add these events to your Cinema Director cutscenes. When previewing at design time, events that produce output (such as Show Alert, Bark, and Start Conversation) will show a stand-in message because their actual output relies on the Dialogue System's runtime environment.
The Show Alert event shows an alert message through the Dialogue Manager's dialogue UI.
Field | Description |
---|---|
Message | The message to show. |
Override Default Duration | If non-zero, show the alert for this many seconds instead of the default duration. |
The Bark event plays a bark.
Field | Description |
---|---|
Conversation | The conversation containing the bark lines |
Bark Order | Play the barks sequentially (in this case, the first one) or in random order |
Barker | The character saying the bark. If unassigned, this track's actor |
Target | The optional target of the bark |
The Lua event runs Lua code.
Field | Description |
---|---|
Lua Code | The Lua code to run |
Debug | Tick to also log the Lua code to the console |
The Start Conversation event starts a conversation.
Field | Description |
---|---|
Conversation | The conversation to start |
Actor | The actor. If unassigned, the player |
Conversant | The conversant. If unassigned, this track's actor |
Dialogue Entry | The dialogue entry to start at. Leave at -1 to start at the beginning |
The Stop Conversation event stops the current conversation.
Implements sequencer command Cinema(), which plays a Cinema Director cutscene.
Syntax: Cinema(
cutscene[, nowait|once|cache
[, group, actor...]])
Description: Plays a Cinema Director cutscene, loading it from Resources if necessary. To prepare a cutscene prefab, create it and save a prefab inside a Resources folder or asset bundle. Then provide the path to that prefab to this command. Cutscenes can be inactive; this command will activate them.
Parameters:
cutscene
: The cutscene to play. If loading from Resources or an asset bundle, provide the full path under Resources.nowait|once|cache
: (Optional) If once
, the cutscene is unloaded from memory when done playing; if cache
, it's kept in memory. Use once
for cutscenes that only play once, such as a unique one-off sequence. Use cache
for generic cutscenes that may be used again, such as a generic body gesture. Defaults to cache
. Cutscenes in the scene (not loaded from Resources) are never unloaded. nowait
specifies to let the cutscene run in the background; this is only valid for cutscenes in the scene, not loaded from Resources.Camera
for Camera Group, or Player
for Player Group. This parameter must be paired with an actor.speaker
or listener
. The group's actor will be set to this GameObject.Notes:
Examples:
Cinema(Cutscenes/MyCutscene)
Cinema(Cutscenes/Bow, cache, Player, speaker)