Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.LevelStorage Class Reference
Inheritance diagram for AC.LevelStorage:

Classes

class  RememberDataPairing
 

Public Member Functions

void OnInitPersistentEngine ()
 
void ClearAllLevelData ()
 
void ClearLevelData (int sceneIndex)
 Wipes stored data for a specific scene from memory. More...
 
void ClearLevelData (string sceneName)
 Wipes stored data for a specific scene from memory. More...
 
void ClearCurrentLevelData ()
 
void RemoveDataFromCurrentLevelData (int constantID)
 Removes all data related to a given object's Constant ID value in the current scene. This is equivalent to resetting that object's Remember component values, so that it has no Remember data stored
Parameters
constantIDThe object's Constant ID value

 
IEnumerator ReturnCurrentLevelData ()
 
void ReturnSubSceneData (SubScene subScene)
 Returns a sub-scene's save data to the appropriate Remember components. More...
 
PlayerData SavePlayerData (Player player, PlayerData playerData)
 
IEnumerator LoadPlayerData (Player player, PlayerData playerData)
 
MainData SavePersistentData (MainData mainData)
 
IEnumerator LoadPersistentData (MainData mainData)
 
void StoreCurrentLevelData ()
 
void StoreAllOpenLevelData ()
 
void StoreSubSceneData (SubScene subScene)
 Combs a sub-scene for data to store, combines it into a SingleLevelData variable, and adds it to the SingleLevelData List, allLevelData. More...
 

Public Attributes

List< SingleLevelDataallLevelData = new List<SingleLevelData> ()
 

Detailed Description

Manages the loading and storage of per-scene data (the various Remember scripts). This needs to be attached to the PersistentEngine prefab

Member Function Documentation

◆ ClearAllLevelData()

void AC.LevelStorage.ClearAllLevelData ( )

Wipes all stored scene save data from memory.

◆ ClearCurrentLevelData()

void AC.LevelStorage.ClearCurrentLevelData ( )

Wipes the currently-loaded scene's save data from memory

◆ ClearLevelData() [1/2]

void AC.LevelStorage.ClearLevelData ( int  sceneIndex)

Wipes stored data for a specific scene from memory.

Parameters
sceneIndexThe build index number of the scene to clear save data for

◆ ClearLevelData() [2/2]

void AC.LevelStorage.ClearLevelData ( string  sceneName)

Wipes stored data for a specific scene from memory.

Parameters
sceneNameThe name of the scene to clear save data for

◆ ReturnCurrentLevelData()

IEnumerator AC.LevelStorage.ReturnCurrentLevelData ( )

Returns the currently-loaded scene's save data to the appropriate Remember components.

◆ ReturnSubSceneData()

void AC.LevelStorage.ReturnSubSceneData ( SubScene  subScene)

Returns a sub-scene's save data to the appropriate Remember components.

Parameters
subSceneThe SubScene component associated with the sub-scene

◆ StoreAllOpenLevelData()

void AC.LevelStorage.StoreAllOpenLevelData ( )

Combs all open scenes for data to store, combines each into a SingleLevelData variable, and adds them to the SingleLevelData List, allLevelData.

◆ StoreCurrentLevelData()

void AC.LevelStorage.StoreCurrentLevelData ( )

Combs the active scene for data to store, combines it into a SingleLevelData variable, and adds it to the SingleLevelData List, allLevelData.

◆ StoreSubSceneData()

void AC.LevelStorage.StoreSubSceneData ( SubScene  subScene)

Combs a sub-scene for data to store, combines it into a SingleLevelData variable, and adds it to the SingleLevelData List, allLevelData.

Parameters
subSceneThe SubScene component associated with the sub-scene

Member Data Documentation

◆ allLevelData

List<SingleLevelData> AC.LevelStorage.allLevelData = new List<SingleLevelData> ()

A collection of level data for each visited scene