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

Public Member Functions

void OnAwake ()
 
void ClearAllLevelData ()
 
void ClearCurrentLevelData ()
 
void ReturnCurrentLevelData (bool restoringSaveFile)
 Returns the currently-loaded scene's save data to the appropriate Remember components. More...
 
void ReturnSubSceneData (SubScene subScene, bool restoringSaveFile)
 Returns a sub-scene's save data to the appropriate Remember components. More...
 
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

◆ ReturnCurrentLevelData()

void AC.LevelStorage.ReturnCurrentLevelData ( bool  restoringSaveFile)

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

Parameters
restoringSaveFileTrue if the game is currently loading a saved game file, as opposed to just switching scene

◆ ReturnSubSceneData()

void AC.LevelStorage.ReturnSubSceneData ( SubScene  subScene,
bool  restoringSaveFile 
)

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

Parameters
subSceneThe SubScene component associated with the sub-scene
restoringSaveFileTrue if the game is currently loading a saved game file, as opposed to just switching 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