Difference between revisions of "CutsceneDirector"

From Headbone Creative
Jump to: navigation, search
(Adding API information)
(Rearranged formatting)
 
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.
 
  
 
== Public Variables ==
 
== Public Variables ==
Line 24: Line 20:
 
==== DESTROY ====
 
==== 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.  
 
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.
 +
[[File:CutsceneDirector1.png|thumb|left|x350px|Creating a new CutsceneDirector]]
 +
[[File:CutsceneDirector2.png|thumb|center|x350px|Creating a new CutsceneDirector]]
 +
  
 
[[Category:API]]
 
[[Category:API]]
 
[[Category:Cutscene Framework]]
 
[[Category:Cutscene Framework]]
 
[[Category:Premium Scripts]]
 
[[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.

Creating a new CutsceneDirector
Creating a new CutsceneDirector
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox