Trigger API Reference DCEI Functions Save0 - funovus/editor-wiki 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)
* [object Save.Get(string key)](#object-savegetstring-key)
* [void Save.Commit()](#void-savecommit)
* [void Save.SetMapEntry(string entry)](#void-savesetmapentrystring-entry)
|
Trigger API Reference\DCEI Functions\Save {Trigger-API-ReferenceDCEI-FunctionsSave}
void Save.Set(string key, object value)
Sets the specified key-value pair in the save data. Save data must be committed with DCEI.Save.Commit()
to actually save the data.
DCEI.Save.Set("key", "value")
DCEI.Save.Commit()
object Save.Get(string key)
Returns the value associated with the given key.
DCEI.Save.Set("key", "value")
local save_val = DCEI.Save.Get("key")
DCEI.LogMessage(save_val)
void Save.Commit()
Writes the current save data to the user's save data. You can view the editor's local save data under Play Settings.
DCEI.Save.Commit()
void Save.SetMapEntry(string entry)
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.
DCEI.Save.SetMapEntry("Map Entry")