This page describes the built-in sequencer commands. You can also define your own commands as described on the Custom Sequencer Commands page. Third-party support packages may also add product-specific sequencer commands.
Syntax: Animation(
animation[, subject[, animations...]])
Description: Plays (cross-fades) legacy animation(s).
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Examples: (sequencer code)
Animation(NervousIdle)
(Plays the speaker's "NervousIdle" animation)Animation(Laugh, listener)
(Plays the listener's "Laugh" animation)Animation(RemoveHat, Sir Lancelot, Bow, ReplaceHat, Idle)
(Plays a sequence of animations. Sir Lancelot removes his hat, bows, replaces hit hat, and returns to his idle animation.)Syntax: AnimatorBool(
animatorParameter[, value[, subject]])
Description: Sets a Mecanim Boolean animator parameter.
Parameters:
true
or false
. Default: true
.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
AnimatorBool(Laughing, true, listener)
(Sets the "Laughing" parameter to true
on the listener's Animator)Syntax: AnimatorController(
controllerName[, subject])
Description: Sets the Mecanim runtime animator controller for a subject's Animator.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
AnimatorController(AnimCtlrs/SwimmingController, listener)
(Makes the listener use the animator controller named "AnimCtlrs/SwimmingController" located inside a Resources folder or registered asset bundle)Syntax: AnimatorFloat(
animatorParameter[, value[, subject[, duration]])
Description: Sets a Mecanim float animator parameter.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
AnimatorFloat(Speed, 2, speaker, 0.5)
(Increases the speaker's Speed parameter to 2.0 over 0.5 seconds)Syntax: AnimatorInt(
animatorParameter[, value[, subject]])
Description: Sets a Mecanim integer animator parameter.
Parameters:
1
.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
AnimatorInt(Mode, 2, Fred)
(Sets the "Mode" parameter to 2
on Fred's Animator.)Syntax: AnimatorLayer(
layerIndex[, weight[, subject[, duration]]])
Description: Sets the weight of a Mecanim animator layer.
Parameters:
1
.1
.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: AnimatorLayer(1, 1, speaker, 0.5)
(Sets layer 1's weight to 1.0 smoothly over 0.5 seconds)
Syntax: AnimatorTrigger(
animatorParameter[, subject[, resetParameter]])
Description: Sets a trigger parameter. Optionally resets another trigger parameter.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
AnimatorTrigger(Jump, Fred)
(Sets the "Jump" trigger on Fred's Animator.)AnimatorTrigger(Idle, , Talk)
(Sets the "Idle" parameter on the speaker and resets (clears) the "Talk" parameter.)Syntax: AnimatorPlay(
stateName[, subject[, [crossfadeDuration[, layer]]])
Description: Plays an animator state. Does not wait for the state to complete.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.0
(play immediately)noactivate
: (Optional) Optional parameter to prevent activation of inactive subjects.Notes:
noactivate
.Example: (sequencer code)
AnimatorPlay(Idle, Fred)
(Plays the "Idle" state on Fred's Animator.)Syntax: AnimatorPlayWait(
stateName[, subject[, [crossfadeDuration[, layer]]])
Description: Plays an animator state. Waits for the state to complete.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.0
(play immediately)Example: (sequencer code)
AnimatorPlayWait(Yawn, Fred, 0.3)
(Fades over 0.3 seconds into the "Yawn" state on Fred's Animator, and waits for it to finish.)Syntax: Audio(
clip[, subject[, oneshot
]])
Description: Loads a clip from Resources or a registered asset bundle into the subject's audio source component and plays it.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.oneshot
: (Optional) Play the audio clip as a oneshot (i.e., calling AudioSource.PlayOneShot) without interrupting the current audio clip playing on the audio source.Notes::
Sequencer.reportMissingAudioFiles
true.Mute
that is true
, the command will not play the audio clip.Example: (sequencer code)
Audio(Hahaha, listener)
(Plays the "Hahaha" audio clip through the listener's audio source component)Syntax: AudioStop(
[subject])
Description: Stops a subject's Audio Source.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Notes::
oneshot
option with Audio(), this command cannot stop the audio.Example: (sequencer code)
AudioStop(listener)
(Stops the listener's audio source component)Syntax: AudioWait(
clip[, subject[, clips...]])
Description: Loads clip(s) from Resources into the subject's audio source component, plays it, and waits until the audio clip is done playing.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Notes:
Sequencer.reportMissingAudioFiles
true.Mute
that is true
, the command will not play the audio clip.Examples: (sequencer code)
AudioWait(Hahaha, listener)
(Plays the "Hahaha" audio clip through the listener's audio source component and doesn't exit until the clip is done)AudioWait(my_mic_sound_nice, speaker, check_one, check_two, check_three)
(Plays four audio clips in order through the speaker's audio source and doesn't exit until they're all done)Syntax: AudioWaitOnce(
clip[, subject[, clips...]])
Description: This command works like AudioWait() except it will check for an internal Lua variable of the entrytag/audioclip name, and if it exists/is true, the audio will be skipped. After one playback, the variable will be created and marked as true.
Syntax: Camera(
angle[, subject[, duration]])
Description: Moves the camera to a specified angle on a subject.
Parameters:
default
: Uses the default camera angle defined on the actor's GameObject. To define this angle, add a Default Camera Angle component to the GameObject. (Window > Dialogue System > Component > Supplemental > Default Camera Angle) If the GameObject doesn't have a Default Camera Angle component, it uses the angle named "Closeup".original
: Use the original pre-conversation camera position. (You should not define angles named 'default' or 'original' since they are reserved keywords.) Default: default
.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Notes:
See Also: Camera Angle Prefab, Default Camera Angles, Zoom2D()
Example: (sequencer code)
Camera(Wide Left, Adam, 3)
(Moves the camera over 3 seconds to a wide left shot of Adam)Syntax: ClearSubtitleText(
panel#|all)
Description: Clears the text of a Standard Dialogue UI subtitle panel (or all panels).
Parameters:
all
: Specify a panel to clear or all
to clear all panels.Example: (sequencer code)
ClearSubtitleText(all)
(Clears all subtitle text)Syntax: Continue([all])
Description: Simulates a continue button click (i.e., moves the conversation forward). If passed all
, continues all active conversations. Otherwise only continues conversation that called this command.
See Also: SetContinueMode()
Notes::
required
in front of the Continue() sequencer command.Example: (sequencer code)
Continue()@3
(Simulates a continue button click at the 3-second mark)Syntax: CinemachinePriority(
vcam, [priority], [cut
])
Parameters:
all
: Set the priority of all vcams.except:
GameObject: Set the priority of all vcams except the one named GameObject.cut
: (Optional) Cuts immediately to the new vcam instead of easing to it.Notes:
See Also: Timeline & Cinemachine
Examples: (sequencer code)
CinemachinePriority(specialCam)
(Sets priority of virtual camera on specialCam
to 999)CinemachinePriority(all, 0)
(Sets priority of all virtual cameras to 0)Syntax: CinemachineTarget(
vcam, [target], [look|follow|both
])
Parameters:
look|follow|both
: Set Look At, Follow, or both. Default: both.Notes:
See Also: Timeline & Cinemachine
Example: (sequencer code)
CinemachineTarget(specialCam, speaker)
(Make specialCam look at the speaker)Syntax: CinemachineZoom(
vcam, zoom, [duration])
Changes the orthographic lens size of a 2D Cinemachine virtual camera.
Parameters:
Notes:
See Also: Timeline & Cinemachine
Example: (sequencer code)
CinemachineZoom(specialCam, 2, 3)
(Zoom to orthographic size 2 over 3 seconds)Syntax: Delay(
duration)
Description: Does nothing for a specified amount of time. You can use this command to keep a sequence "playing" even if nothing else is going on.
Parameters:
Example: (sequencer code)
Delay(2.5)
(Delays 2.5 seconds)Syntax: DOF(
subject|off,
[duration], [volumeSubject])
Description: Updates the Post Processing Stack's Depth of Field effect to focus on a subject.
Parameters:
off
, turns off the effect instead.Notes:
Example: (sequencer code)
Camera(Closeup,Bob,2); DOF(Bobs Head,2)
(Sets DOF distance to 'Bobs Head' while zooming into a closeup on Bob)Syntax: Fade(in|out|stay|unstay
[, duration[, webcolor]])
Description: Fades the screen in or out.
Parameters:
in
or out
or stay
: Fade in or out. stay
is identical to out
except it keeps the screen faded.Notes:
stay
. This ensures that the screen stays faded out until you fade it back in.unstay
keyword works like in
except it does not fade in if the screen is already visible.stay
and unstay
work from the fader's current alpha; in
and out
fade from alpha 1 to 0 and from 0 to 1, respectively.Example: (sequencer code)
Fade(out, 1, #000000)
(Fades out to black over 1 second. Equivalent to Fade(out)
.)Syntax: GotoEntry(
entry[, conversation]])
Description: Jumps to a dialogue entry.
Parameters:
Example: (sequencer code)
GotoEntry(Goodbye)
(Jumps to the entry whose Title or Dialogue Text is "Goodbye".)Syntax: HidePanel(
panelNumber[, portrait|portraitimage
])
Description: Hides a standard dialogue UI subtitle panel or its portrait. The panel will automatically reappear the next time a dialogue entry node uses it.
Parameters:
portrait
or portraitimage
: (Optional) If portrait
is specified as the second parameter, only hides the portrait image and name. If portraitimage
is specified, only hides the portait image but not the name. Note that these are special keywords. Specify exactly portrait
or portraitimage
, not a filename or actor name.Examples: (sequencer code)
HidePanel(0)
(Hides subtitle panel 0, which is typically the main NPC subtitle panel.)HidePanel(1, portrait)
(Hides subtitle panel 1's portrait image and name but leaves the rest of the panel visible.)Syntax: LiveCamera(
angle[, subject[, duration]])
Description: Moves the camera to a specified angle on a subject, tracking the subject if it moves. If you don't need to track a moving subject, you can use Camera().
Parameters:
default
: Uses the default camera angle defined on the actor's GameObject. To define this angle, add a Default Camera Angle component to the GameObject. (Window > Dialogue System > Component > Supplemental > Default Camera Angle) If the GameObject doesn't have a Default Camera Angle component, it uses the angle named "Closeup".original
: Use the original pre-conversation camera position. (You should not define angles named 'default' or 'original' since they are reserved keywords.) Default: default
.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Notes:
See Also: Camera Angle Prefab, Default Camera Angles, Zoom2D()
Example: (sequencer code)
LiveCamera(Wide Left, Adam, 3)
(Moves the camera over 3 seconds to a wide left shot of Adam, tracking Adam if he's moving)Syntax: LoadLevel(
levelName, [
spawnpoint], [additive])
Description: Loads a new scene. It tries, in order:
Parameters:
Actor["Player"].Spawnpoint
or tells the Save System to spawn the player at the spawnpoint.additive
: If a third parameter is specified and is exactly 'additive
', then this command will load the scene additively. In this case, the spawnpoint will not be used.Example: (sequencer code)
LoadLevel(Shipyard)
(Loads the level named "Shipyard")LoadLevel(Shipyard,WestEntrance)
(Loads the level named "Shipyard" and places the player at WestEntrance)LoadLevel(SceneToAdd,,additive)
(Loads "SceneToAdd" additively to the current scene)Syntax: LookAt([
target[, subject[, duration[, allAxes
]]]])
Description: Rotates a subject to look at a target, over a specified duration of time. Note: Frequently, you may want to make the conversants face each other when starting a conversation. To do this, add LookAt() commands to the first dialogue entry in the conversation.
If no arguments are provided, the speaker and listener immediately look at each other.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.allAxes
: (Optional) If specified, rotates on all axes. Otherwise keeps the subject upright.Examples: (sequencer code)
LookAt()
(Makes the speaker and listener immediately look at each other)LookAt(listener)
(Makes the speaker immediately rotate to look at the listener)LookAt(Car, Bill, 2)
(Makes Bill rotate toward Car over 2 seconds)Syntax: MoveTo(
target[, subject[, duration]])
Description: Moves a subject to the same position and rotation as a target, over a specified duration of time. If the subject has a rigidbody, this command uses Rigidbody.MovePosition/MoveRotation; otherwise it sets the transform directly. If the subject has a NavMeshAgent, uses NavMeshAgent.Warp.
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
MoveTo(Moonwell, Wisp, 3)
(Moves the Wisp to the Moonwell over 3 seconds)Syntax: NavMeshAgent(stop
|destination[, subject])
Description: Sets a subject's NavMeshAgent to a destination, or stops it.
Parameters:
stop
|destination: The destination transform to move to, or stop
to stop.speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Example: (sequencer code)
NavMeshAgent(Moonwell, Wisp)
(Tells the Wisp's NavMeshAgent to navigate to the Moonwell)Syntax: None()
Description: A null command that does nothing.
The Dialogue System uses the Dialogue Manager's Default Sequence whenever it encounters a dialogue entry whose Sequence field is blank. If you want the dialogue entry to have no sequence, use this command. If the dialogue entry's Sequence is None() or Continue(), the conversation will not display its subtitle.
Example: (sequencer code)
None()
Syntax: OpenPanel(
panelNumber, [open|close|focus|unfocus])
Description: Opens, closes, focuses, or unfocuses a subtitle panel.
Parameters:
open|close|focus|unfocus
: The state to put the panel in. Default: open. If the panel is closed and the state is open
, then it will open the panel as if its Visibility dropdown were set to Always From Start, which shows the portrait of the actor that uses the panel.Example: (sequencer code)
OpenPanel(1, open)
(Opens subtitle panel 1)Syntax: QTE(
index, duration, luaVariable, luaValue)
Description: Presents an opportunity for a Quick Time Event (QTE). The opportunity lasts for the specified duration. If the player triggers the QTE, a Lua variable is set to a specified value; otherwise it's set to a blank string.
Parameters:
0
-based index number of the QTE indicator defined in the dialogue UI. Before using this command, you should add QTE indicators to your dialogue UI, and specify the QTE input trigger buttons in the Dialogue Manager's display settings.true
or false
). Otherwise the variable will be set to the string value.Example: (sequencer code)
QTE(0, 2, Punch_NPC, yes)
This example presents a two-second QTE opportunity for the player to punch the NPC. If the player inputs the QTE trigger in time, the Lua variable Variable["Punch_NPC"]
will be set to "Yes"
. If this is in a conversation, then link to an empty child dialogue entry node whose Sequence is set to None()
, and then link from that empty node to one or more dialogue entries that check the value in their Conditions. If it's set, the entry can execute the QTE.
For more details on QTEs, see Quick Time Events.
Syntax: RandomizeNextEntry([norepeat])
Description: The next NPC dialogue entry will be randomly chosen from the list of valid NPC dialogue entries instead of using the first one in the list.
Parameters:
true
, this command will try to avoid choosing the same entry it used the last time RandomizeNextEntry() was called on this entry. Default: false.Notes: If you want to randomize the first line of a conversation, start it with a blank node whose Sequence is set to RandomizeNextEntry(). From that node, link to the list of random nodes.
Example: (sequencer code)
RandomizeNextEntry()
Syntax: SendMessage(
methodName[, arg[, subject[, broadcast
]]])
Description: Calls GameObject.SendMessage(methodName, arg, DontRequireReceiver)
on the subject.
Parameters:
string
. This means your method should accept a string parameter.speaker
: The current speaker (default value)listener
: The current listenereveryone
: Send the message to all GameObjects in the sceneSendMessage(myMessage,,mySubject)
(Note the two commas between "myMessage" and "mySubject", indicating a blank argument for the second parameter and "mySubject" for the third parameter.)broadcast
: (Optional) If broadcast
is supplied as the fourth argument, this command will use GameObject.BroadcastMessage() to broadcast the message to the subject and all of its children. Otherwise it will use GameObject.SendMessage() to send the message only to the subject.Notes:
string
.Example: (sequencer code)
SendMessage(TakeDamage, 50, listener)
(Calls listener.SendMessage("TakeDamage", "50")
, to tell the listener to take 50 damage. The listener should have a method named TakeDamage(string damage)
)Syntax: SendMessageUpwards(
methodName[, arg[, subject]])
Description: Calls GameObject.SendMessageUpwards(methodName, arg, DontRequireReceiver)
on the subject.
Parameters:
string
. This means your method should accept a string parameter.speaker
: The current speaker (default value)listener
: The current listenerSendMessage(myMessage,,mySubject)
(Note the two commas between "myMessage" and "mySubject", indicating a blank argument for the second parameter and "mySubject" for the third parameter.)Notes:
broadcast
or everyone
.string
.Example: (sequencer code)
SendMessageUpwards(Flash, red, listener)
(Calls listener.SendMessageUpwards("Flash", "red")
, on the listener. The listener and/or its parents should have a method named Flash(string color)
)Syntax: SequencerMessage(
message)
Description: Sends a message to the sequencer. Equivalent to C# Sequencer.Message("message");
.
Parameters:
Notes:
Example: (sequencer code)
SequencerMessage(Dance)
(Sends the message "Dance" to the sequencer.)Syntax: SetActive(
gameObject[, value])
Description: Sets a game object active or inactive.
Parameters:
true
, false
, or flip
(negate the current value).Notes:
Example: (sequencer code)
SetActive(Force Field, false)
(Deactivates the force field)SetActive(tag=Enemy, false)
(Deactivates all GameObjects tagged Enemy)Syntax: SetContinueMode(true|false|original)
Description: Sets the continue button mode. You can use this command if you need to temporarily change the continue button mode during a dialogue entry's sequence.
Parameter:
true
: Saves the current continue button mode and sets it to Always.false
: Saves the current continue button mode and sets it to Never.original
: Restores the saved continue button mode.See Also: Continue([all])
Example: (sequencer code)
(Disables the continue button during the first 2 seconds of a sequence.)
Syntax: SetDialoguePanel(true|false
, [immediate
])
Description: Shows or hides the dialogue panel (i.e., the entire dialogue UI).
Parameters:
true|false
: Show or hide.immediate
: If specified for SetDialoguePanel(false), immediately hides the dialogue panel instead of playing its hide animation. Useful particularly if you are hiding the dialogue panel at the beginning of a conversation. If showing again after hiding at the beginning of a conversation, you may need to trigger your subtitle panel(s)' Show animations depending on your dialogue UI.Notes:
Examples: (sequencer code)
SetDialoguePanel(false); SetDialoguePanel(true)@2
(Hide the dialogue UI for 2 seconds)SetDialoguePanel(false,immediate); SetDialoguePanel(true)@2; AnimatorTrigger(Show,NPC Subtitle Panel)
(Hide the dialogue UI for 2 seconds at the beginning of the conversation and show the NPC Subtitle Panel when showing the dialogue UI again)Syntax: SetEnabled(
component[, value[, subject]])
Description: Enables or disables a component.
Parameters:
true
, false
, or flip
(negate the current value)speaker
, listener
, or the name of a game object in the scene. Default: speaker
.Notes:
Example: (sequencer code)
SetEnabled(AttackAI, false, listener)
(Disables the "AttackAI" component on the listener to turn off the listener's attack mode)SetEnabled(AttackAI, true, tag=Enemy)
(Enables AttackAI on all GameObjects tagged Enemy)Syntax: SetMenuPanel(
actorName, panelID)
Description: Changes a dialogue actor's menu panel number. If a conversation is active, takes effect in the actor's next menu.
Parameters:
Notes:
Examples: (sequencer code)
SetMenuPanel(Bob, 1)
(Changes Bob's menu panel to panel 1)Syntax: SetPanel(
actorName, panelID, [immediate
])
Description: Changes a dialogue actor's subtitle panel number. If a conversation is active, takes effect in the actor's next line.
Parameters:
immediate
: (Optional) If specified as the third parameter, panel change takes effect immediately.Notes:
Examples: (sequencer code)
SetPanel(Bob, 2)
(Changes Bob's subtitle panel to panel 2; takes effect next line)SetPanel(Joe, 1, immediate)
(Changes Joe's subtitle panel to panel 1 immediately)Syntax: SetPortrait(
actorName, textureName)
Description: Sets the portrait texture of a dialogue actor. Possible uses:
Parameters:
default
to use the original texture defined in the dialogue database, or pic=#
(no spaces) to use one of the actor's portrait images as defined in the database (similar to the [pic=#] tag as described in the Markup Tags). You can also use pic=
varName if you've set Lua Variable["varName"] to a number.Notes:
Actor[
"actorName" ].Current_Portrait
that conversations look up. If it's set, this texture name is used instead of the portrait in the dialogue database. Since all Actor[] fields are saved by the Save System, this is saved, and the dialogue database is left unmodified.Examples: (sequencer code)
SetPortrait(Bob, BobAngry)
(Changes Bob's portrait to the texture "BobAngry")SetPortrait(Bob, pic=BobPicID)
(Changes Bob's portrait to the actor pic number specified by the variable BobPicID)Syntax: SetTimeout(
value)
Description: Sets the response menu timeout duration.
Parameters:
Notes:
SetTimeout(n)
in the dialogue entry preceding the response menu. Then use SetTimeout(0)
in the dialogue entry following the response menu to disable the timer for subsequent menus.Example: (sequencer code)
SetTimeout(5)
(Sets a 5 second timeout on response menus)Syntax: SetVariable(
variable[, value])
Description: Sets a variable to a specified value.
Parameters:
Variable[]
table.true
, false
, a number, or a string.Note::
Example: (sequencer code)
SetVariable(MyBoolVar, true)
(Sets the variable "MyBoolVar" to true)Syntax: ShowAlert(
[duration])
Description: Calls DialogueManager.ShowAlert() to show the value of Variable["Alert"]. If this command is called in a conversation, Show Alerts During Conversations must be ticked.
Parameters:
Example: (sequencer code)
ShowAlert()
Syntax: StopConversation()
Description: Stops the current conversation.
Example: (sequencer code)
StopConversation()
Syntax: SwitchCamera(
[cameraName])
Description: Changes to a different sequencer camera. For example, you can switch to a camera with a different set of post-processing effects such as a grayscale effect or a blurry dreamlike effect. Note that you don't need to use SwitchCamera() to simply move the camera to preset shots in the scene. To do that, you can position empty GameObjects (or even inactive camera objects) and pass them as the angle parameter to the Camera() command. In addition, if you simply want to enable or disable a specific effect on the main sequencer camera, you can use the SetEnabled() command on it.
Parameters:
Example: (sequencer code)
SwitchCamera(My Sepia Camera)
(Changes to a camera named "My Sepia Camera")Syntax: TextInput(
textFieldUI, label, luaVariable[, maxLength[, clear
]])
Description: Uses a text field UI to prompt for text input.
Parameters:
var=
varName, it uses the value of the variable varName.Variable[]
table that will contain the player's input. This command starts by initializing the text field to the variable's current value. If the variable's type is Number in the dialogue database, the user's input is stored in the variable as a number; otherwise the input is stored as a text string.clear
: (Optional) If present, initializes the text field to an empty string instead of the variable's current value.Notes:
Example: (sequencer code)
TextInput(MyTextInputUI,Favorite Color,Fav_Color)
(Uses the text field UI located on the object named MyTextInputUI to display a text input prompt. The prompt's label is "Favorite Color". The user's input is stored in Variable['Fav_Color']
.)Syntax: Timeline(
mode, timeline, [nowait
], [nostop
]. [#:binding]...)
Description: Controls a Timeline (PlayableDirector).
Parameters:
play
, pause
, resume
, stop
, or speed
.speed
, the third parameter must be the speed value [0..1].pause
*.nowait
: If specified, doesn't wait for the director to finish.nostop
: If specified, doesn't force the director to stop at the end of the sequencer command.nowait
and nostop
can be in either order.)Notes:
pause
and resume
modes above, it will replay any playables at the current time in the timeline, including one-off playables such as Bark. If you don't want this to happen, use the speed
mode to set the timeline's speed to 0 instead of pausing.See Also: Timeline & Cinemachine
Examples: (sequencer code)
Timeline(play,mySpecialTimeline)
(Plays the timeline on mySpecialTimeline
)Timeline(play,Dance,0:Player,1:Princess)
(Plays the timeline Dance
, binding track 0 to Player and track 1 to Princess)Syntax: UpdateTracker()
Description: Updates the quest tracker HUD (see Quests).
Example: (sequencer code)
UpdateTracker()
Syntax: Voice(
audioClip, animation[, finalAnimation[, subject [, crossfadeDuration [, layer]]]])
Description: Plays audio and animation, and doesn't finish until both are done. Useful for playing a voice-acted line. (See Lipsync for other lipsync options.)
Parameters:
speaker
, listener
, or the name of a game object in the scene. Default: speaker
.0
(play immediately)Notes:
Mute
that is true
, the command will not play the audio clip.Sequencer.reportMissingAudioFiles
true.Example: (sequencer code)
Voice(Bob/Hello, LipsyncHello, Idle, Bob)
(Plays the audio clip "Bob/Hello" and animation "LipsyncHello" on Bob. When both are done, plays the "Idle" animation on Bob.)Syntax: WaitForMessage(
message, [message...])
Description: Waits until another sequencer command sends a sequencer message using ->Message(
message)
or a C# script calls Sequencer.Message(message).
Parameters:
Note: Combined with the SendMessage() command, you can devise back-and-forth interaction between GameObjects and sequences.
Example: (sequencer code)
SendMessage(StartDrilling,,Drill); WaitForMessage(StruckOil)
Sequencer.Message("StruckOil")
)Syntax: Zoom2D(
subject[, size[, duration]])
Description: Does a 2D orthographic camera zoom on a subject.
Parameters:
speaker
, listener
, original
, or the name of a game object in the scene. If original
, moves the camera to the original position and size before the sequencer took control of the camera. Default: speaker
.16
.Note: The Zoom2D() command works with 2D orthographic cameras. For 3D perspective cameras, use Camera().
Example: (sequencer code)
Zoom2D(Player, 8, 2)
(Zooms in to orthographicSize 8 on Player over 2 seconds)