Cinema Director Support

This page describes how to set up the Dialogue System with Cinema Director. (Cinema Director is required.)

Cinema Director copyright © Cinema Suite.

How to Set Up Cinema Director Support

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.

Example Scenes

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 loads a cutscene from a prefab in a Resources folder.


Events

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.

Global Track Events

Show Alert Event

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.

Actor Track Events

Bark Event

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.

Lua Event

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.

Start Conversation Event

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.

Stop Conversation Event

The Stop Conversation event stops the current conversation.


Sequencer Commands

Cinema()

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.
  • group: (Optional) The name of a group (e.g., Camera for Camera Group, or Player for Player Group. This parameter must be paired with an actor.
  • actor: (Optional): The name of a GameObject in the scene, or speaker or listener. The group's actor will be set to this GameObject.

Notes:

  • Prefab cutscenes don't remember the actors assigned to their groups. You have to specify them in the sequencer command. This also allows you to bind different objects to groups at runtime.
  • You can provide any number of group, actor parameters to this command.
  • The Camera Group is automatically connected to the main camera; you don't need to include it in the parameters.
  • Some actions such as DisableBehavior that reference objects in the scene such as a component on a GameObject aren't compatible with prefab cutscenes.

Examples:

  • Cinema(Cutscenes/MyCutscene)
    • Plays the cutscene "Cutscenes/MyCutscene" located in the scene or inside a Resources folder.
  • Cinema(Cutscenes/Bow, cache, Player, speaker)
    • Plays the cutscene "Cutscenes/Bow" using the speaker as the actor for Player Group. Keeps the sequence in memory for re-use.

<< Third Party Integration