Trigger API Reference DCEI Functions Save0 - BLKTower/TestWiki GitHub Wiki

Table of Contents

Trigger API Reference\DCEI Functions\Save {Trigger-API-ReferenceDCEI-FunctionsSave}

void Save.Set(string key, object value) {void-SaveSetstring-key-object-value}

void Save.Set(string key, object value)

Description

Sets the specified key-value pair in the save data. Save data must be committed with DCEI.Save.Commit() to actually save the data.

Parameters

  • string key the key of the pair.
  • object value the value of the pair.

Example Usage

DCEI.Save.Set("key", "value")
DCEI.Save.Commit()

object Save.Get(string key) {object-SaveGetstring-key}

object Save.Get(string key)

Description

Returns the value associated with the given key.

Parameters

  • string key the key to return the value of.

Example Usage

DCEI.Save.Set("key", "value")
local save_val = DCEI.Save.Get("key")
DCEI.LogMessage(save_val)

void Save.Commit() {void-SaveCommit}

void Save.Commit()

Description

Writes the current save data to the user's save data. You can view the editor's local save data under Play Settings.

Example Usage

DCEI.Save.Commit()

void Save.SetMapEntry(string entry) {void-SaveSetMapEntrystring-entry}

void Save.SetMapEntry(string entry)

Description

Sets the map entry in save data. Only works in mobile or web builds. Useful if your game has a series of maps to progress through instead of always loading the same entry map.

Parameters

  • string entry the map entry name.

Example Usage

DCEI.Save.SetMapEntry("Map Entry")

⚠️ **GitHub.com Fallback** ⚠️