Difference between revisions of "CutsceneDirector"
(added category) |
(Rearranged formatting) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
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. | ||
+ | == 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. | ||
+ | |||
+ | == 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. | 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. | ||
+ | [[File:CutsceneDirector1.png|thumb|left|x350px|Creating a new CutsceneDirector]] | ||
+ | [[File:CutsceneDirector2.png|thumb|center|x350px|Creating a new CutsceneDirector]] | ||
+ | |||
+ | [[Category:API]] | ||
[[Category:Cutscene Framework]] | [[Category:Cutscene Framework]] | ||
+ | [[Category:Premium Scripts]] |
Latest revision as of 04:01, 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.
Contents |
[edit] Public Variables
[edit] resetOnDisable : bool
If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.OnDisable is called.
[edit] resetOnEnable : bool
If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.OnEnable is called.
[edit] resetOnStart : bool
If this is set to true, the OnCutsceneReset function will be called when MonoBehavior.Start is called.
[edit] playAutomatically : bool
If this is set to true, the OnCutsceneStart function will be called when MonoBehavior.Start is called.
[edit] finishedAction : OnFinishedAction
This defines what action to take when the cutscene or sequence of cutscenes are completely finished. It can be the following values:
[edit] RESET
This will call OnCutsceneReset when the cutscene is finished.
[edit] RESTART
This will call OnCutsceneStart when the cutscene is finished.
[edit] DISABLE
This will set enabled to false when the cutscene finishes.
[edit] DESTROY
This will destroy the GameObject to which the cutscene is attached when the cutscenes are finished.
[edit] 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.