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

Public Member Functions

void OnSpawn ()
 
TransformData SaveTransformData ()
 Serialises appropriate GameObject values into a string. More...
 
void LoadTransformData (TransformData data)
 Deserialises a string of data, and restores the GameObject to its previous state. More...
 
- Public Member Functions inherited from AC.ConstantID
virtual string SaveData ()
 Serialises appropriate GameObject values into a string. Overriden by subclasses. More...
 
virtual void LoadData (string stringData)
 Deserialises a string of data, and restores the GameObject to its previous state. Overridden by subclasses. More...
 
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

bool saveParent
 
bool saveScenePresence
 
int linkedPrefabID
 
- Public Attributes inherited from AC.ConstantID
int constantID
 
bool retainInPrefab = false
 
AutoManual autoManual = AutoManual.Automatic
 

Properties

bool SavePrevented [get, set]
 

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)
 

Detailed Description

Attach this to GameObject whose position, parentage, or scene presence you wish to save.

Member Function Documentation

◆ LoadTransformData()

void AC.RememberTransform.LoadTransformData ( TransformData  data)

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

Parameters
stringDataThe data, serialised as a string

◆ SaveTransformData()

TransformData AC.RememberTransform.SaveTransformData ( )

Serialises appropriate GameObject values into a string.

Returns
The data, serialised as a string

Member Data Documentation

◆ linkedPrefabID

int AC.RememberTransform.linkedPrefabID

If non-zero, the Constant ID number of the prefab to re-spawn if not present in the scene, but saveScenePresence = true. If zero, the prefab will be assumed to have the same ID as this.

◆ saveParent

bool AC.RememberTransform.saveParent

True if the GameObject's change in parent should be recorded

◆ saveScenePresence

bool AC.RememberTransform.saveScenePresence

True if the GameObject's change in scene presence should be recorded

Property Documentation

◆ SavePrevented

bool AC.RememberTransform.SavePrevented
getset

If True, saving is prevented