You can customize the Sequencer's behavior through the Dialogue Manager's Display Settings:
Property | Description |
---|---|
Sequencer Camera | The sequencer camera or prefab or instantiate during sequences |
Alternate Camera Object | Assign this if your camera is not a Unity Camera – for example, if it's an Oculus VR camera object instead |
Camera Angles | The Camera Angle Prefab that contains the camera angles that the sequencer should use |
Default Sequence | The sequence to use when a dialogue entry doesn't have its own sequence. The keyword {{end}} is automatically replaced with the duration determined by Subtitle Chars Per Second |
Disable Internal Sequencer Commands | Tick to disable all internally-handled sequencer commands defined in Sequencer.cs |
To create your own sequence commands:
Scripts/Templates/SequencerCommandTemplate.cs
.[REMOVE THIS LINE]
.SequencerCommandTemplate
to SequencerCommand
Foo, where Foo is the name of your command. In your sequences, you'll use the command Foo()
.Method | Description |
---|---|
Start() | Initialize the command. You can use GetParameter() to read the parameters that were provided to the command |
Update() | (Optional) Progress the command forward one frame. For example, if the command smoothly moves an object over time, update the transform by Time.deltaTime |
OnDestroy() | (Optional) "Clean up" the command. For example, move the object to its final position |
In Start() and/or Update(), whichever is appropriate, call Stop()
to indicate that the command is done. Otherwise the command will remain active forever, and the sequence will never register as finished.
To see examples, you can browse the source code to the built-in commands in
Scripts/Core/Model-View-Controller/View/Sequencer/SequencerCommands
.
This sequencer command loads a new level.
LoadLevel(My Level Name)
Note that a version of this script is now included in the Dialogue System itself. The code remains here as an example.