Difference between revisions of "CutsceneDirector"
(added category) |
(Adding API information) |
||
Line 1: | Line 1: | ||
+ | [[File:CutsceneDirector1.png|thumb|right|Creating a new CutsceneDirector]] | ||
+ | [[File:CutsceneDirector2.png|thumb|right|Creating a new CutsceneDirector]] | ||
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. | 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. | ||
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. | 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. | ||
+ | == Public Variables == | ||
+ | === resetOnDisable : bool === | ||
+ | If this is set to true, the [[Cutscene#public_event_CutsceneNotification_OnCutsceneReset|OnCutsceneReset]] function will be called when [http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnDisable.html MonoBehavior.OnDisable] is called. | ||
+ | === resetOnEnable : bool === | ||
+ | If this is set to true, the [[Cutscene#public_event_CutsceneNotification_OnCutsceneReset|OnCutsceneReset]] function will be called when [http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnEnable.html MonoBehavior.OnEnable] is called. | ||
+ | === resetOnStart : bool === | ||
+ | If this is set to true, the [[Cutscene#public_event_CutsceneNotification_OnCutsceneReset|OnCutsceneReset]] function will be called when [http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.Start.html MonoBehavior.Start] is called. | ||
+ | === playAutomatically : bool === | ||
+ | If this is set to true, the [[Cutscene#public_event_CutsceneNotification_OnCutsceneStart|OnCutsceneStart]] function will be called when [http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.Start.html 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 [[Cutscene#public_event_CutsceneNotification_OnCutsceneReset|OnCutsceneReset]] when the cutscene is finished. | ||
+ | ==== RESTART ==== | ||
+ | This will call [[Cutscene#public_event_CutsceneNotification_OnCutsceneStart|OnCutsceneStart]] when the cutscene is finished. | ||
+ | ==== DISABLE ==== | ||
+ | This will set [http://docs.unity3d.com/Documentation/ScriptReference/Behaviour-enabled.html enabled] to false when the cutscene finishes. | ||
+ | ==== DESTROY ==== | ||
+ | This will [http://docs.unity3d.com/Documentation/ScriptReference/Object.Destroy.html destroy] the GameObject to which the cutscene is attached when the cutscenes are finished. | ||
+ | |||
+ | [[Category:API]] | ||
[[Category:Cutscene Framework]] | [[Category:Cutscene Framework]] | ||
+ | [[Category:Premium Scripts]] |
Revision as of 03:33, 15 April 2013
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.
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.
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.