A persistent class that can save the essential parts of an object : its transform data (position, rotation, scale) and its active state This inherits from MMPersistentBase and implements the IMMPersistent interface It's a good example of how to implement the interface's OnSave and OnLoad methods.
More...
Inherits MoreMountains.Tools.MMPersistentBase.
|
| override string | OnSave () |
| | On Save, we turn the object's transform data and active state to a Json string and return it to the MMPersistencyManager.
|
| override void | OnLoad (string data) |
| | On load, we read the saved json data and apply it to our object's properties.
|
| virtual string | GetGuid () |
| | Returns the object's GUID.
|
| virtual void | SetGuid (string newGUID) |
| | Lets you set the object's GUID.
|
| virtual bool | ShouldBeSaved () |
| | Lets the persistence manager know whether or not the object should be saved.
|
| virtual string | GenerateGuid () |
| | Generates a unique ID for the object, using the scene name, the object name, and a GUID.
|
| virtual bool | GuidIsUnique (string guid) |
| | Checks if the object's ID is unique or not.
|
| virtual void | ValidateGuid () |
| | Validates the object's GUID, and generates a new one if needed, until a unique one is found.
|
|
| bool | SavePosition = true |
| | whether or not to save this object's position
|
| bool | SaveLocalRotation = true |
| | whether or not to save this object's rotation
|
| bool | SaveLocalScale = true |
| | whether or not to save this object's scale
|
| bool | SaveActiveState = true |
| | whether or not to save this object's active state
|
| bool | SaveEnabledStates = false |
| | whether or not to save this object's components' enabled states
|
| bool | SaveActive = true |
| | whether or not this object should be saved
|
| string | UniqueIDSuffix |
| | an optional suffix to add to the GUID, to make it more readable
|
| bool | GenerateGuidButton |
| | a debug button used to force a new GUI generation
|
|
| string | _guid |
| | the object's unique ID
|
A persistent class that can save the essential parts of an object : its transform data (position, rotation, scale) and its active state This inherits from MMPersistentBase and implements the IMMPersistent interface It's a good example of how to implement the interface's OnSave and OnLoad methods.
◆ GetCurrentComponents()
| virtual List< ComponentData > MoreMountains.Tools.MMPersistent.GetCurrentComponents |
( |
| ) |
|
|
protectedvirtual |
Grabs all components on this object.
◆ OnLoad()
| override void MoreMountains.Tools.MMPersistent.OnLoad |
( |
string | data | ) |
|
|
virtual |
◆ OnSave()
| override string MoreMountains.Tools.MMPersistent.OnSave |
( |
| ) |
|
|
virtual |
On Save, we turn the object's transform data and active state to a Json string and return it to the MMPersistencyManager.
- Returns
Reimplemented from MoreMountains.Tools.MMPersistentBase.
◆ SaveActiveState
| bool MoreMountains.Tools.MMPersistent.SaveActiveState = true |
whether or not to save this object's active state
◆ SaveEnabledStates
| bool MoreMountains.Tools.MMPersistent.SaveEnabledStates = false |
whether or not to save this object's components' enabled states
◆ SaveLocalRotation
| bool MoreMountains.Tools.MMPersistent.SaveLocalRotation = true |
whether or not to save this object's rotation
◆ SaveLocalScale
| bool MoreMountains.Tools.MMPersistent.SaveLocalScale = true |
whether or not to save this object's scale
◆ SavePosition
| bool MoreMountains.Tools.MMPersistent.SavePosition = true |
whether or not to save this object's position
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/InventoryEngineStore/Assets/InventoryEngine/MMTools/Core/MMSaveLoad/MMPersistent.cs