PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq Class Reference

Implements sequencer command uSeq(USSequence), which loads a uSequencer sequence from Resources and plays it. More...

Inheritance diagram for PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq:
Collaboration diagram for PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq:

Public Member Functions

void Start ()
 Starts the command by preparing and playing the sequence. More...
 
void Update ()
 Checks the status of the sequence; if done playing, calls Stop(). More...
 
void OnDestroy ()
 Handles cleanup at the end of the sequence. More...
 
- 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. More...
 
void Initialize (Sequencer sequencer, Transform speaker, Transform listener, params string[] parameters)
 Initializes the base properties. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand
void Stop ()
 Call this method to indicate that the command is done playing. More...
 
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). More...
 
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). More...
 
string GetParameter (int i, string defaultValue=null)
 Gets the i-th parameter (zero-based). More...
 
GetParameterAs< T > (int i, T defaultValue)
 Gets the i-th parameter (zero-based) as a specified type. More...
 
float GetParameterAsFloat (int i, float defaultValue=0)
 Gets the i-th parameter as a float. More...
 
int GetParameterAsInt (int i, int defaultValue=0)
 Gets the i-th parameter as an int. More...
 
bool GetParameterAsBool (int i, bool defaultValue=false)
 Gets the i-th parameter as a bool. More...
 
string GetParameters ()
 Gets the parameters as a comma-separated string. More...
 
bool IsAudioMuted ()
 Checks whether a Lua variable "Mute" is defined and true. More...
 
- Properties inherited from PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand
bool IsPlaying [get, protected set]
 Indicates whether the command is still playing. More...
 
Sequencer Sequencer [get]
 Reference to the Sequencer, so you can access its properties such as SequencerCamera and CameraAngles. More...
 
string[] Parameters [get]
 The parameters for the command. More...
 
string endMessage [get]
 Optional message to send the sequencer when the command completes. More...
 
Transform?? speaker [get]
 
Transform?? listener [get]
 

Detailed Description

Implements sequencer command uSeq(USSequence), which loads a uSequencer sequence from Resources and plays it.

Syntax: uSeq(USSequence[, once|cache[, index, object...]])

Description: Loads a uSequencer sequence from Resources and plays it. To prepare a uSequencer sequence, create it and save a prefab inside a Resources folder. Then provide the path to that prefab to this command.

By default, each uSequencer timeline container remembers the path to its affected object so it can find the object when you instantiate the prefab. However, if the object's actual path is different at runtime, you can set the affected object using the index and object parameters as described below.

Parameters:

  • USSequence: The path to a uSequencer sequence inside a Resources folder.
  • once|cache: (Optional) If once, the sequence is unloaded from memory when done playing; if cache, it's kept in memory. Use once for sequences that only play once, such as a unique one-off sequence. Use cache for generic sequences that may be used again, such as a generic body gesture. Defaults to cache. Note: Since Resources.UnloadAsset() doesn't work for certain types such as uSequencer sequence prefabs, the unload calls Resources.UnloadUnusedAssets(). This process can slow down framerate, so you may choose to simply keep the sequence in memory and let garbage collection automatically unload it later.
  • index: (Optional) The index number of a USTimelineContainer in the sequence. This parameter must be paired with an object.
  • object: (Optional): The name of an object in the scene, or speaker or listener. The affected object of the USTimelineContainer will be set to this object.
  • Note: You can provide any number of "<em>index</em>, <em>object</em>" parameters to this command.

Examples:

  • uSeq(Cutscenes/USCutscene1)
    • Plays the uSequencer sequence "Cutscenes/USCutscene1" located inside a Resources folder.
  • uSeq(Cutscenes/Bow, cache, 1, speaker)
    • Plays the uSequencer sequence "Cutscenes/Bow" using the speaker as the affected object for the USTimelineContainer whose index is 1. Keeps the sequence in memory for re-use.
  • uSeq(Cutscenes/GetToDaChoppa, once, 1, Arnold, 2, Helicopter)
    • Plays the uSequencer sequence "Cutscenes/GetToDaChoppa" using the game object "Arnold" as the affected object for the USTimelineContainer whose index is 1 and the game object "Helicopter" as the affected object for the USTimelineContainer whose index is 2. When done playing, removes the sequence from memory.

Member Function Documentation

◆ OnDestroy()

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq.OnDestroy ( )

Handles cleanup at the end of the sequence.

◆ Start()

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq.Start ( )

Starts the command by preparing and playing the sequence.

◆ Update()

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq.Update ( )

Checks the status of the sequence; if done playing, calls Stop().


The documentation for this class was generated from the following file: