Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.RememberTransform Class Reference
Inheritance diagram for AC.RememberTransform:
AC.ConstantID

Public Member Functions

override void OnSpawn ()
TransformData SaveTransformData ()
 Serialises appropriate GameObject values into a string.
void LoadTransformData (TransformData data)
 Deserialises a string of data, and restores the GameObject to its previous state.
Public Member Functions inherited from AC.ConstantID
virtual string SaveData ()
 Serialises appropriate GameObject values into a string. Overriden by subclasses.
void SetManualID (int _id)
int AssignInitialValue (bool forcePrefab=false)
 Sets a new Constant ID number.
void SetNewID_Prefab ()

Public Attributes

bool saveParent
bool saveScenePresence
int linkedPrefabID
GlobalLocal transformSpace = GlobalLocal.Global
int loadOrder
Public Attributes inherited from AC.ConstantID
int constantID
bool retainInPrefab = false
AutoManual autoManual = AutoManual.Automatic

Properties

bool SavePrevented [get, set]

Additional Inherited Members

Static Public Member Functions inherited from AC.ConstantID
static HashSet< T > GetComponents< T > (int constantIDValue)
 Gets all components in the Hierarchy that also have a ConstantID component on the same GameObject.
static T GetComponent< T > (int constantIDValue, GameObject root=null)
 Gets a component in the Hierarchy that also has a ConstantID component on the same GameObject.
static ConstantID GetComponent (int constantIDValue)
 Gets a ConstantID component in the Hierarchy with a given ID number.
static HashSet< T > GetComponents< T > (int constantIDValue, Scene scene)
 Gets all components of a particular type within the scene, with a given ConstantID number.
static HashSet< T > GetComponents< T > (Scene scene)
 Gets all components of a particular type within the scene. Only components with an associated ConstantID number will be returned.
static T GetComponent< T > (int constantIDValue, Scene scene, bool sceneOnlyPrioritises=false)
 Gets a component associated with a given ConstantID number, in a particular scene.
static ConstantID GetComponent (int constantIDValue, Scene scene, bool sceneOnlyPrioritises=false)
 Gets a ConstantID component ID number, in a particular scene.
static void FindLocalReferences (MenuCommand command)
static void FindGlobalReferences (MenuCommand command)
Protected Member Functions inherited from AC.ConstantID
void OnEnable ()
virtual void Start ()
void OnDisable ()
virtual void OnInitialiseScene ()
bool[] StringToBoolArray (string _string)
int[] StringToIntArray (string _string)
float[] StringToFloatArray (string _string)
string[] StringToStringArray (string _string)
string ArrayToString< T > (T[] _list)
void Update ()

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

◆ OnSpawn()

override void AC.RememberTransform.OnSpawn ( )
virtual

Initialises the component. This needs to be called if the object it is attached to is generated/spawned at runtime manually through code.

Reimplemented from AC.ConstantID.

◆ 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.

◆ loadOrder

int AC.RememberTransform.loadOrder

An integer used to sort the order in which RememberTransform scripts are loaded. Note that RememberTransform scripts will always be loaded before regular Remember scripts.

◆ 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

◆ transformSpace

GlobalLocal AC.RememberTransform.transformSpace = GlobalLocal.Global

How to reference transform co-ordinates (Global, Local)

Property Documentation

◆ SavePrevented

bool AC.RememberTransform.SavePrevented
getset

If True, saving is prevented