Store serialized data from your components on disk or in the cloud with an easily configurable persistence system. The package uses the Object Serialization package to serialize and deserialize data.
See the wiki of the repository to get started with the package.
- A persistence system component that is configured solely with components on a GameObject. Add adapters to the system to specify filesystems or cloud services to save and load data. Acces the functonality of the system through scripting.
- Use the Object Serialization package to save and load the state of a component. Craft a state structure reminiscent of JSON to persist only the data you want to persist.
- List over files in the adapters and move, copy, or delete them through scripting.
- Define custom backends to define how the state is stored in a file. The persistence system uses MessagePack to serialize states by default, but this can easily be changed on the component.
- Define custom adapters for different filesystems or cloud services. A local filesystem adapter is included.
This package depends on the following packages:
- Serializable Types, version 1.0.2 or higher.
- Object Serialization, version 1.0.3 or higher.
- Unity IMGUI Editor Utilities, version 2.0.7 or higher.
If you're installing the required packages from the OpenUPM registry, make sure to add a scoped registry with the URL https://package.openupm.com
and the required scopes before installing the packages.
To install this package as a package from the OpenUPM registry in the Unity Editor, use the following steps:
- In the Unity editor, navigate to Edit › Project Settings... › Package Manager.
- Add the following Scoped Registry, or edit the existing OpenUPM entry to include the new Scope:
Name: package.openupm.com
URL: https://package.openupm.com
Scope(s): com.audune.persistence
- Navigate to Window › Package Manager.
- Click the + icon and click Add package by name...
- Enter the following name in the corresponding field and click Add:
com.audune.persistence
To install this package as a Git package in the Unity Editor, use the following steps:
- In the Unity editor, navigate to Window › Package Manager.
- Click the + icon and click Add package from git URL...
- Enter the following URL in the URL field and click Add:
https://github.com/audunegames/object-persistence.git
This package is licensed under the GNU LGPL 3.0 license. See LICENSE.txt
for more information.