A static utility class for Sequencer.
More...
|
static Transform | GetSubject (string specifier, Transform speaker, Transform listener, Transform defaultSubject=null) |
| Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera). More...
|
|
static GameObject | FindSpecifier (string specifier, bool onlyActiveInScene=false) |
| Finds a game object with the specified name, returning any match in scene before trying to return any non-scene matches in the project. More...
|
|
static string | GetDefaultCameraAngle (Transform subject) |
| Gets the default camera angle for a subject. More...
|
|
static string | GetParameter (string[] parameters, int i, string defaultValue=null) |
| Gets parameters[i] . More...
|
|
static T | GetParameterAs< T > (string[] parameters, int i, T defaultValue) |
| Gets parameters[i] as the specified type. More...
|
|
static float | GetParameterAsFloat (string[] parameters, int i, float defaultValue=0) |
| Gets the i-th parameter as a float. More...
|
|
static int | GetParameterAsInt (string[] parameters, int i, int defaultValue=0) |
| Gets the i-th parameter as an int. More...
|
|
static bool | GetParameterAsBool (string[] parameters, int i, bool defaultValue=false) |
| Gets the i-th parameter as a bool. More...
|
|
static AudioSource | GetAudioSource (Transform subject) |
| Gets the audio source on a subject, using the Dialogue Manager as the subject if the specified subject is null . More...
|
|
static bool | IsAudioMuted () |
| Checks if a Lua variable "Mute" is true . More...
|
|
A static utility class for Sequencer.
◆ FindSpecifier()
static GameObject PixelCrushers.DialogueSystem.SequencerTools.FindSpecifier |
( |
string |
specifier, |
|
|
bool |
onlyActiveInScene = false |
|
) |
| |
|
static |
Finds a game object with the specified name, returning any match in scene before trying to return any non-scene matches in the project.
Checks GameObjects registered with the specifier as its actor name first.
- Returns
- The specified game object.
- Parameters
-
specifier | The name to search for. |
onlyActiveInScene | Only search active objects in the scene. |
◆ GetAudioSource()
static AudioSource PixelCrushers.DialogueSystem.SequencerTools.GetAudioSource |
( |
Transform |
subject | ) |
|
|
static |
Gets the audio source on a subject, using the Dialogue Manager as the subject if the specified subject is null
.
If no audio source exists on the subject, this method adds one.
- Returns
- The audio source.
- Parameters
-
◆ GetDefaultCameraAngle()
static string PixelCrushers.DialogueSystem.SequencerTools.GetDefaultCameraAngle |
( |
Transform |
subject | ) |
|
|
static |
Gets the default camera angle for a subject.
- Returns
- The default camera angle. If the subject doesn't have a DefaultCameraAngle component, returns "Closeup".
- Parameters
-
◆ GetParameter()
static string PixelCrushers.DialogueSystem.SequencerTools.GetParameter |
( |
string[] |
parameters, |
|
|
int |
i, |
|
|
string |
defaultValue = null |
|
) |
| |
|
static |
Gets parameters[i]
.
- Returns
parameters[i]
, or the specified default value if i
is out of range.
- Parameters
-
parameters | An array of parameters. |
i | The index into parameters[] |
defaultValue | The default value to return if i is out of range. |
◆ GetParameterAs< T >()
static T PixelCrushers.DialogueSystem.SequencerTools.GetParameterAs< T > |
( |
string[] |
parameters, |
|
|
int |
i, |
|
|
T |
defaultValue |
|
) |
| |
|
static |
Gets parameters[i]
as the specified type.
- Returns
parameters[i]
as type T, or the specified default value if i
is out of range or parameters[i]
can't be converted to type T.
- Parameters
-
parameters | An array of parameters. |
i | The index into parameters[] |
defaultValue | The default value to return if i is out of range or the parameter can't be converted to type T. |
- Template Parameters
-
T | The type to convert the parameter to. |
// Get parameters[1] as a float, defaulting to 5f: float duration = GetParameterAs<float>(parameters, 1, 5f);
◆ GetParameterAsBool()
static bool PixelCrushers.DialogueSystem.SequencerTools.GetParameterAsBool |
( |
string[] |
parameters, |
|
|
int |
i, |
|
|
bool |
defaultValue = false |
|
) |
| |
|
static |
Gets the i-th parameter as a bool.
- Returns
- The parameter as bool, or defaultValue if out of range.
- Parameters
-
parameters | The array of parameters. |
i | The zero-based index of the parameter. |
defaultValue | The default value to use if the parameter doesn't exist or isn't valid for the type. |
◆ GetParameterAsFloat()
static float PixelCrushers.DialogueSystem.SequencerTools.GetParameterAsFloat |
( |
string[] |
parameters, |
|
|
int |
i, |
|
|
float |
defaultValue = 0 |
|
) |
| |
|
static |
Gets the i-th parameter as a float.
- Returns
- The parameter as float, or defaultValue if out of range.
- Parameters
-
parameters | The array of parameters. |
i | The zero-based index of the parameter. |
defaultValue | The default value to use if the parameter doesn't exist or isn't valid for the type. |
◆ GetParameterAsInt()
static int PixelCrushers.DialogueSystem.SequencerTools.GetParameterAsInt |
( |
string[] |
parameters, |
|
|
int |
i, |
|
|
int |
defaultValue = 0 |
|
) |
| |
|
static |
Gets the i-th parameter as an int.
- Returns
- The parameter as an int, or defaultValue if out of range.
- Parameters
-
parameters | The array of parameters. |
i | The zero-based index of the parameter. |
defaultValue | The default value to use if the parameter doesn't exist or isn't valid for the type. |
◆ GetSubject()
static Transform PixelCrushers.DialogueSystem.SequencerTools.GetSubject |
( |
string |
specifier, |
|
|
Transform |
speaker, |
|
|
Transform |
listener, |
|
|
Transform |
defaultSubject = null |
|
) |
| |
|
static |
Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera).
This utility function that returns the specified subject.
- Returns
- The transform of the specified subject, or null if the specifier names a game object that isn't in the scene.
- Parameters
-
specifier | "speaker" , "listener" , or the name of a game object in the scene. |
speaker | Speaker. |
listener | Listener. |
defaultSubject | Default subject. |
◆ IsAudioMuted()
static bool PixelCrushers.DialogueSystem.SequencerTools.IsAudioMuted |
( |
| ) |
|
|
static |
Checks if a Lua variable "Mute" is true
.
- Returns
true
if audio is muted; otherwise, false
.
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Source/Assets/Dialogue System/Scripts/Core/Model-View-Controller/View/Sequencer/SequencerTools.cs