Implements sequencer command SLATE(), which plays a SLATE cutscene. More...
Public Member Functions | |
void | Start () |
Starts the command by preparing and playing the sequence. | |
void | OnDestroy () |
Handles cleanup at the end of the sequence. | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand | |
void | Initialize (Sequencer sequencer, string endMessage, Transform speaker, Transform listener, params string[] parameters) |
Initializes the base properties. | |
void | Initialize (Sequencer sequencer, Transform speaker, Transform listener, params string[] parameters) |
Initializes the base properties. | |
Protected Member Functions | |
void | Finish () |
Moves original camera to match final cutscene camera position, then stops. | |
Protected Member Functions inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand | |
void | Stop () |
Call this method to indicate that the command is done playing. | |
Transform | GetSubject (string specifier, Transform defaultSubject=null) |
Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera). | |
Transform | GetSubject (int i, Transform defaultSubject=null) |
Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera). | |
string | GetParameter (int i, string defaultValue=null) |
Gets the i-th parameter (zero-based). | |
T | GetParameterAs< T > (int i, T defaultValue) |
Gets the i-th parameter (zero-based) as a specified type. | |
float | GetParameterAsFloat (int i, float defaultValue=0) |
Gets the i-th parameter as a float. | |
int | GetParameterAsInt (int i, int defaultValue=0) |
Gets the i-th parameter as an int. | |
bool | GetParameterAsBool (int i, bool defaultValue=false) |
Gets the i-th parameter as a bool. | |
string | GetParameters () |
Gets the parameters as a comma-separated string. | |
bool | IsAudioMuted () |
Checks whether a Lua variable "Mute" is defined and true . | |
Additional Inherited Members | |
Public Attributes inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand | |
bool | isPlaying = true |
Indicates whether the command is still playing. | |
Properties inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand | |
Sequencer | sequencer [get] |
Reference to the Sequencer, so you can access its properties such as SequencerCamera and CameraAngles. | |
string[] | parameters [get] |
The parameters for the command. | |
string | endMessage [get] |
Optional message to send the sequencer when the command completes. | |
Transform | speaker [get] |
Transform | listener [get] |
Implements sequencer command SLATE(), which plays a SLATE cutscene.
Syntax: SLATE(
cutscene[ nowait|once|cache|pause|resume
[, actor...]])
Description: Plays a SLATE cutscene, loading it from Resources if necessary. To prepare a cutscene prefab, create it and save a prefab inside a Resources folder, asset bundle, or Addressable. Then provide the name/path to that prefab to this command. Cutscenes can be inactive; this command will activate them.
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.
cutscene
: The cutscene to play. If loading from Resources, provide the full path under Resources.nowait|once|cache|resume
: (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. pause
and resume
pause and resume a cutscene.speaker
or listener
. The group's actor will be set to this GameObject. The actors will be assigned in order. You can provide any number of "<em>actor</em>" parameters to this command.If in a conversation, moves the main camera to match the final cutscene camera position. This helps prevent a one-frame flash of the main camera's original position when switching dialogue entries.
Examples:
SLATE(Cutscenes/MyCutscene)
SLATE(Cutscenes/Bow, cache, speaker)
|
inlineprotected |
Moves original camera to match final cutscene camera position, then stops.
|
inline |
Handles cleanup at the end of the sequence.
|
inline |
Starts the command by preparing and playing the sequence.