Saves and restores the hierarchy state of this GameObject and its children. You can selectively enable the saving of position, rotation, scale, and active state. Ideal for scenes where multiple items or entities need to remember their state after being modified or deactivated.
More...
|
void | OnSave () |
| Called automatically when saving the game. Captures the selected data (position, rotation, etc.) for each child in the hierarchy.
|
|
void | OnLoad () |
| Called automatically when loading the game. Restores each child object's transform and active state based on the saved data.
|
|
|
bool | savePosition = false |
| Whether to save and restore each object's world position.
|
|
bool | saveRotation = false |
| Whether to save and restore each object's world rotation.
|
|
bool | saveScale = false |
| Whether to save and restore each object's local scale.
|
|
bool | saveActiveState = true |
| Whether to save and restore each object's active state.
|
|
|
static string | GetRelativePath (Transform root, Transform target) |
| Builds the relative path of a child transform with respect to a parent.
|
|
Saves and restores the hierarchy state of this GameObject and its children. You can selectively enable the saving of position, rotation, scale, and active state. Ideal for scenes where multiple items or entities need to remember their state after being modified or deactivated.
◆ GetRelativePath()
static string Backbone::HierarchyPersistence::GetRelativePath |
( |
Transform | root, |
|
|
Transform | target ) |
|
staticprivate |
Builds the relative path of a child transform with respect to a parent.
- Parameters
-
root | The root transform to start from. |
target | The child transform to generate the path for. |
- Returns
- The relative hierarchy path.
◆ OnLoad()
void Backbone::HierarchyPersistence::OnLoad |
( |
| ) |
|
Called automatically when loading the game. Restores each child object's transform and active state based on the saved data.
◆ OnSave()
void Backbone::HierarchyPersistence::OnSave |
( |
| ) |
|
Called automatically when saving the game. Captures the selected data (position, rotation, etc.) for each child in the hierarchy.
◆ saveActiveState
bool Backbone::HierarchyPersistence::saveActiveState = true |
Whether to save and restore each object's active state.
◆ savedStates
Stores the persistent state (position, rotation, scale, active) of each child by path.
◆ savePosition
bool Backbone::HierarchyPersistence::savePosition = false |
Whether to save and restore each object's world position.
◆ saveRotation
bool Backbone::HierarchyPersistence::saveRotation = false |
Whether to save and restore each object's world rotation.
◆ saveScale
bool Backbone::HierarchyPersistence::saveScale = false |
Whether to save and restore each object's local scale.
The documentation for this class was generated from the following file: