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

Public Types

enum  Space { WorldSpace , LocalSpace }

Public Member Functions

override string SaveData ()
 Serialises appropriate GameObject values into a string. Overriden by subclasses.
override void LoadData (string stringData)
 Deserialises a string of data, and restores the GameObject to its previous state. Overridden by subclasses.
void ShowGUI ()
Public Member Functions inherited from AC.Remember
virtual IEnumerator LoadDataCo (string stringData)
 Deserialises a string of data, and restores the GameObject to its previous state. By default, this just runs LoadData - only override this if the loading process takes multiple frames.
Public Member Functions inherited from AC.ConstantID
virtual void OnSpawn ()
void SetManualID (int _id)
int AssignInitialValue (bool forcePrefab=false)
 Sets a new Constant ID number.
void SetNewID_Prefab ()

Public Attributes

AC_OnOff startState = AC_OnOff.On
Space saveTransformInSpace = Space.WorldSpace
Public Attributes inherited from AC.ConstantID
int constantID
bool retainInPrefab = false
AutoManual autoManual = AutoManual.Automatic

Protected Member Functions

override void OnInitialiseScene ()
Protected Member Functions inherited from AC.ConstantID
void OnEnable ()
virtual void Start ()
void OnDisable ()
bool[] StringToBoolArray (string _string)
int[] StringToIntArray (string _string)
float[] StringToFloatArray (string _string)
string[] StringToStringArray (string _string)
string ArrayToString< T > (T[] _list)
void Update ()

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 Attributes inherited from AC.Remember
bool savePrevented = false
Properties inherited from AC.Remember
bool SavePrevented [get, set]
virtual int LoadOrder [get]

Detailed Description

This script is attached to Moveable, Draggable or PickUp objects you wish to save.

Member Function Documentation

◆ LoadData()

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

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

Parameters
stringDataThe data, serialised as a string

Reimplemented from AC.Remember.

◆ OnInitialiseScene()

override void AC.RememberMoveable.OnInitialiseScene ( )
protectedvirtual

Reimplemented from AC.ConstantID.

◆ SaveData()

override string AC.RememberMoveable.SaveData ( )
virtual

Serialises appropriate GameObject values into a string. Overriden by subclasses.

Returns
The data, serialised as a string (empty in the base class)

Reimplemented from AC.ConstantID.

Member Data Documentation

◆ saveTransformInSpace

Space AC.RememberMoveable.saveTransformInSpace = Space.WorldSpace

The co-ordinate system to record the object's Transform values in

◆ startState

AC_OnOff AC.RememberMoveable.startState = AC_OnOff.On

Determines whether the object is on or off when the game starts