Description
Save/Load actions for Playmaker to support SaveLoad addon. Actions allow you to save/load game to/from file(s), located in the Unity's persistent folder. WebGl platform requires special setup
Available actions:
- SaveGame: save a game to a file.
- LoadGame: load a game from a file.
- ListSaves: load all file names to string array (without path and extension)
- DeleteSave: delete saved file.
Additional information:
- All files have ".sav" extension.
- SaveGame/LoadGame/DeleteSave have optional fileName parameter (default is "game"). fileName parameter format is a file name without path and extension.
- All actions have "debug" parameter- if it's turned on, information about files is printed to Unity console.
WebGl platform:
WebGl player does not have access to physical disk and uses IndexedDB database instead, so it requires special actions. We used this guide to implement them.
WebGl platform setup guide:
- Download actions for WebGl here
- Use BGSaveGameWebGl to save a game, BGLoadGameWebGl to load a game and BGDeleteGameWebGl to delete the saved file This actions will work only in WebGl builds. They will not work on any other platforms (including Unity Editor)
- All 3 actions have GameName and SaveName parameters. You need to choose it only once and stick to it. If you change them afterward - save files will not be found They will be used as file path for IndexedDB database (which is used on WebGL platform instead of file system) Use only latin letters for maximum compatibility So if you choose "MySuperGame" as GameName and "MySave" as SaveName the final save file path will be /idbfs/MySuperGame/MySave.dat You need to make sure all actions use the same names
- Use "debug" parameter to print debug information to browser console
- There is an additional file, which is required to flush the IndexedDB database cache to the disk, otherwise saved data may be lost. This file is located under plugins folder (BGDatabaseFsSync.jslib). Do not remove it
EasySave
You can use Easy Save (or similar) assets to save database data. Here is the custom actions for saving/loading database data locally (under persistent data folder) with EasySave: download
Releases
Click to see all releases
Version | Release date | Log |
---|---|---|
1.3 | Jun 02, 2024 | |
1.2 | Oct 23, 2021 | FIXED: ListSaves does not return the actual file list |
1.1 | July 19, 2021 | ADDED: Resize table and reload database actions |
1.0 | Sep 16, 2020 | Versioning reset (unified plugin infrastructure) |
0.1.0 | August 05, 2019 | Initial release |