Add this component to a scene and it'll let you save and load the state of objects that implement the IMMPersistent interface You can create your own classes that implement this interface, or use the MMPersistent class that comes with this package It will save their transform data (position, rotation, scale) and their active state Triggering save and load is done via events, and the manager also emits events every time data is loaded or saved
More...
Add this component to a scene and it'll let you save and load the state of objects that implement the IMMPersistent interface You can create your own classes that implement this interface, or use the MMPersistent class that comes with this package It will save their transform data (position, rotation, scale) and their active state Triggering save and load is done via events, and the manager also emits events every time data is loaded or saved
◆ Awake()
override void MoreMountains.Tools.MMPersistenceManager.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ ComputeCurrentSceneName()
virtual void MoreMountains.Tools.MMPersistenceManager.ComputeCurrentSceneName |
( |
| ) |
|
|
protectedvirtual |
Grabs the current scene's name and stores it
◆ DeletePersistenceFile()
virtual void MoreMountains.Tools.MMPersistenceManager.DeletePersistenceFile |
( |
| ) |
|
|
virtual |
Deletes the save file for this persistence manager
◆ DeletePersistenceMemory()
virtual void MoreMountains.Tools.MMPersistenceManager.DeletePersistenceMemory |
( |
| ) |
|
|
virtual |
Deletes all persistence data stored in this persistence manager's memory
◆ DeletePersistencyMemoryForScene()
virtual void MoreMountains.Tools.MMPersistenceManager.DeletePersistencyMemoryForScene |
( |
string |
sceneName | ) |
|
|
virtual |
Deletes all persistence data for the specified scene
- Parameters
-
◆ DetermineSaveName()
virtual string MoreMountains.Tools.MMPersistenceManager.DetermineSaveName |
( |
| ) |
|
|
protectedvirtual |
Determines the name of the file to write to store persistence data
- Returns
◆ FindAllPersistentObjects()
virtual IMMPersistent [] MoreMountains.Tools.MMPersistenceManager.FindAllPersistentObjects |
( |
| ) |
|
|
protectedvirtual |
Finds all objects in the scene that implement IMMPersistent and may need saving
- Returns
◆ InitializeStatics()
static void MoreMountains.Tools.MMPersistenceManager.InitializeStatics |
( |
| ) |
|
|
staticprotected |
Statics initialization to support enter play modes
◆ Load()
virtual void MoreMountains.Tools.MMPersistenceManager.Load |
( |
| ) |
|
|
virtual |
On Load, we load from memory and from file if needed
◆ LoadFromFileToMemory()
virtual void MoreMountains.Tools.MMPersistenceManager.LoadFromFileToMemory |
( |
| ) |
|
|
virtual |
Loads data from file and stores it in memory
◆ LoadFromMemory()
virtual void MoreMountains.Tools.MMPersistenceManager.LoadFromMemory |
( |
| ) |
|
|
virtual |
Loads data from memory and applies it to all objects that need it
◆ OnDisable()
virtual void MoreMountains.Tools.MMPersistenceManager.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On enable, we stop listening for MMGameEvents
◆ OnEnable()
virtual void MoreMountains.Tools.MMPersistenceManager.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable, we start listening for MMGameEvents
◆ OnMMEvent()
virtual void MoreMountains.Tools.MMPersistenceManager.OnMMEvent |
( |
MMGameEvent |
gameEvent | ) |
|
|
virtual |
When we get a MMEvent, we filter on its name and invoke the appropriate methods if needed
- Parameters
-
◆ ResetPersistence()
virtual void MoreMountains.Tools.MMPersistenceManager.ResetPersistence |
( |
| ) |
|
|
virtual |
Deletes persistence data from memory and on file for this persistence manager
◆ Save()
virtual void MoreMountains.Tools.MMPersistenceManager.Save |
( |
| ) |
|
|
virtual |
On Save, we save to memory and to file if needed
◆ SaveFromMemoryToFile()
virtual void MoreMountains.Tools.MMPersistenceManager.SaveFromMemoryToFile |
( |
| ) |
|
|
virtual |
Saves data from memory to a file
◆ SaveToMemory()
virtual void MoreMountains.Tools.MMPersistenceManager.SaveToMemory |
( |
| ) |
|
|
virtual |
Saves data from objects that need saving to memory
◆ _currentSceneName
string MoreMountains.Tools.MMPersistenceManager._currentSceneName |
|
protected |
◆ _resourceItemPath
string MoreMountains.Tools.MMPersistenceManager._resourceItemPath = "Persistence/" |
|
static |
◆ _saveFileExtension
string MoreMountains.Tools.MMPersistenceManager._saveFileExtension = ".persistence" |
|
static |
◆ _saveFolderName
string MoreMountains.Tools.MMPersistenceManager._saveFolderName = "MMTools/" |
|
static |
◆ DeletePersistenceFileButton
bool MoreMountains.Tools.MMPersistenceManager.DeletePersistenceFileButton |
◆ ListenForLoadEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForLoadEvents = true |
whether or not this manager should listen for load events. If you set this to false, you'll have to call LoadFromMemory or LoadFromFileToMemory manually
◆ ListenForLoadFromFileEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForLoadFromFileEvents = true |
whether or not this manager should listen for load from file events. If you set this to false, you'll have to call LoadFromFileToMemory manually
◆ ListenForLoadFromMemoryEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForLoadFromMemoryEvents = true |
whether or not this manager should listen for load from memory events. If you set this to false, you'll have to call LoadFromMemory manually
◆ ListenForSaveEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForSaveEvents = true |
whether or not this manager should listen for save events. If you set this to false, you'll have to call SaveToMemory or SaveFromMemoryToFile manually
◆ ListenForSaveToFileEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForSaveToFileEvents = true |
whether or not this manager should listen for save to file events. If you set this to false, you'll have to call SaveFromMemoryToFile manually
◆ ListenForSaveToMemoryEvents
bool MoreMountains.Tools.MMPersistenceManager.ListenForSaveToMemoryEvents = true |
whether or not this manager should listen for save to memory events. If you set this to false, you'll have to call SaveToMemory manually
◆ LoadFromFileButton
bool MoreMountains.Tools.MMPersistenceManager.LoadFromFileButton |
◆ LoadFromFileOnLoadEvents
bool MoreMountains.Tools.MMPersistenceManager.LoadFromFileOnLoadEvents = true |
whether or not this manager should load data from file on load events
◆ LoadFromMemoryButton
bool MoreMountains.Tools.MMPersistenceManager.LoadFromMemoryButton |
◆ PersistenceID
string MoreMountains.Tools.MMPersistenceManager.PersistenceID = "MMPersistency" |
A persistence ID used to identify the data associated to this manager. Usually you'll want to leave this to its default value.
◆ SaveToFileButton
bool MoreMountains.Tools.MMPersistenceManager.SaveToFileButton |
◆ SaveToFileOnSaveEvents
bool MoreMountains.Tools.MMPersistenceManager.SaveToFileOnSaveEvents = true |
whether or not this manager should save data to file on save events
◆ SaveToMemoryButton
bool MoreMountains.Tools.MMPersistenceManager.SaveToMemoryButton |
the debug buttons below are only meant to be used at runtime
◆ SceneDatas
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMSaveLoad/MMPersistenceManager.cs