Adventure Creator  1.68.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.RememberVisibility Class Reference
Inheritance diagram for AC.RememberVisibility:
AC.Remember AC.ConstantID

Public Member Functions

override string SaveData ()
 Serialises appropriate GameObject values into a string. More...
 
override void LoadData (string stringData)
 Deserialises a string of data, and restores the GameObject to its previous state. More...
 
- Public Member Functions inherited from AC.ConstantID
virtual void LoadData (string stringData, bool restoringSaveFile)
 A base function, overridden by subclasses when loading data. More...
 
int AssignInitialValue (bool forcePrefab=false)
 Sets a new Constant ID number. More...
 
void SetNewID_Prefab ()
 

Public Attributes

AC_OnOff startState = AC_OnOff.On
 
bool affectChildren = false
 
bool saveColour = false
 
- Public Attributes inherited from AC.ConstantID
int constantID
 
bool retainInPrefab = false
 
AutoManual autoManual = AutoManual.Automatic
 

Additional Inherited Members

- Protected Member Functions inherited from AC.ConstantID
bool GameIsPlaying ()
 
void Update ()
 
bool [] StringToBoolArray (string _string)
 
int [] StringToIntArray (string _string)
 
float [] StringToFloatArray (string _string)
 
string [] StringToStringArray (string _string)
 
string ArrayToString< T > (T[] _list)
 
- Protected Attributes inherited from AC.Remember
bool savePrevented = false
 
- Properties inherited from AC.Remember
bool SavePrevented [get, set]
 

Detailed Description

Attach this to GameObjects whose Renderer's enabled state you wish to save. Fading in and out, due to the SpriteFader component, is also saved.

Member Function Documentation

◆ LoadData()

override void AC.RememberVisibility.LoadData ( string  stringData)
virtual

Deserialises a string of data, and restores the GameObject to its previous state.

Parameters
stringDataThe data, serialised as a string

Reimplemented from AC.ConstantID.

◆ SaveData()

override string AC.RememberVisibility.SaveData ( )
virtual

Serialises appropriate GameObject values into a string.

Returns
The data, serialised as a string

Reimplemented from AC.ConstantID.

Member Data Documentation

◆ affectChildren

bool AC.RememberVisibility.affectChildren = false

True if child Renderers should be affected as well

◆ saveColour

bool AC.RememberVisibility.saveColour = false

If True, the sprite's colour/alpha will be saved

◆ startState

AC_OnOff AC.RememberVisibility.startState = AC_OnOff.On

Whether the Renderer is enabled or not when the game begins