CutsceneDirector

From Headbone Creative
Jump to: navigation, search

This script controls the starting and stopping of a cutscene or sequence of cutscenes. Cutscenes are driven by the Cutscene Director: this means that a CutsceneDirector must be at the top of the GameObject hierarchy of cutscene commands.

Contents

Public Variables

resetOnDisable : bool

If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.OnDisable is called.

resetOnEnable : bool

If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.OnEnable is called.

resetOnStart : bool

If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.Start is called.

playAutomatically : bool

If this is set to true, the OnCutsceneStart function will be called when MonoBehavior.Start is called.

finishedAction : OnFinishedAction

This defines what action to take when the cutscene or sequence of cutscenes are completely finished. It can be the following values:

RESET

This will call OnCutsceneReset when the cutscene is finished.

RESTART

This will call OnCutsceneStart when the cutscene is finished.

DISABLE

This will set enabled to false when the cutscene finishes.

DESTROY

This will destroy the GameObject to which the cutscene is attached when the cutscenes are finished.

Creating a new Cutscene Director

The easiest way to create a new cutscene director is to go to GameObject -> Create Other -> Cutscene Director, or use the Create menu from the Hierarchy window.

Creating a new CutsceneDirector
Creating a new CutsceneDirector
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox