Downloads

← Back Save/Load actions for Playmaker
Version:
1.2
Format:
Unity package
Dependencies:
BGDatabase, Playmaker

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:

  1. SaveGame: save a game to a file.
  2. LoadGame: load a game from a file.
  3. ListSaves: load all file names to string array (without path and extension)
  4. DeleteSave: delete saved file.

Additional information:

  1. All files have ".sav" extension.
  2. SaveGame/LoadGame/DeleteSave have optional fileName parameter (default is "game"). fileName parameter format is a file name without path and extension.
  3. 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:

  1. Download actions for WebGl here
  2. 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)
  3. 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
  4. Use "debug" parameter to print debug information to browser console
  5. 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 EasySave (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.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
← Back to Downloads