This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
UDBase.Controllers.SaveSystem
konh edited this page Apr 25, 2018
·
2 revisions
ISave implementation, which used JSON file with FullSerializer. File with name from settings is saved to Application.persistantDataPath.
public class UDBase.Controllers.SaveSystem.FsJsonDataSave
: ISave, ILogContext
Methods
Type | Name | Summary |
---|---|---|
T |
GetNode(Boolean autoFill) |
|
void |
SaveNode(T node) |
ISave implementation, which doesn't save data between sessions
public class UDBase.Controllers.SaveSystem.InMemorySave
: ISave
Fields
Type | Name | Summary |
---|---|---|
Dictionary<Type, Object> |
_state |
Methods
Type | Name | Summary |
---|---|---|
InMemorySave |
AddNode(String name) |
|
T |
GetNode(Boolean autoFill) |
|
void |
SaveNode(T node) |
Using ISave methods you can load and save runtime specific data (any custom class derived from ISaveSource). ISaveSource implementation is required only for ClassTypeReference filtering. All nodes need to added in controller settings. You can make inner controller state as private nested class for controller and control all changes via this controller methods.
public interface UDBase.Controllers.SaveSystem.ISave
Methods
Type | Name | Summary |
---|---|---|
T |
GetNode(Boolean autoFill = True) |
|
void |
SaveNode(T node) |
Interface for savable items
public interface UDBase.Controllers.SaveSystem.ISaveSource
public static class UDBase.Controllers.SaveSystem.Save
Static Methods
Type | Name | Summary |
---|---|---|
void |
OpenDirectory() | Opens the saves directory |
Save node with information about save itself
public class UDBase.Controllers.SaveSystem.SaveInfoNode
: ISaveSource
Properties
Type | Name | Summary |
---|---|---|
Int64 |
LocalTime | Last saved local date time |
Int64 |
Version | How many times save have been saved |
Methods
Type | Name | Summary |
---|---|---|
void |
Update() |