Difference between revisions of "DisplayStateActivateOnChanged"
From Headbone Creative
(Initial page, includes API information and categories) |
(Added image link) |
||
Line 1: | Line 1: | ||
+ | [[File:DisplayStateActivateOnChanged.png|thumb|right|Custom editor interface for this script]] | ||
This is a type of [[DisplayStateListener]] that activates or deactivates all of its child objects depending upon the current Display State. Note that the object itself should remain activated at all times; thus it is best to attach this script to an otherwise empty GameObject. | This is a type of [[DisplayStateListener]] that activates or deactivates all of its child objects depending upon the current Display State. Note that the object itself should remain activated at all times; thus it is best to attach this script to an otherwise empty GameObject. | ||
Latest revision as of 04:52, 21 April 2013
This is a type of DisplayStateListener that activates or deactivates all of its child objects depending upon the current Display State. Note that the object itself should remain activated at all times; thus it is best to attach this script to an otherwise empty GameObject.
Contents |
[edit] Public Variables
[edit] activeStates : List<string>
This is a list of all of the display states that will cause the children of the object to be activated.
[edit] Public Functions
[edit] void HandleStateChanged (string newState)
This is called by the DisplayStateListener whenever the state changes. The new state is passed in as the parameter.
[edit] void SetChildrenActive (bool active)
This is called by HandleStateChanged to turn the child objects on or off, depending upon whether or not the state was in the list of activeStates or not.