wiki.sine.space | sinespace

Difference between revisions of "Scripting/SPersistence"

From wiki.sine.space
Jump to: navigation, search
(Created page with "The SPersistence class allows you to store persistent data to the region. =Members= ==Get/Set Values== {{ScriptFunction|void|SetValue|(string key, string value);|Set a value...")
 
Line 4: Line 4:
 
==Get/Set Values==
 
==Get/Set Values==
  
{{ScriptFunction|void|SetValue|(string key, string value);|Set a value as 'key'='value'.}}
+
{{ScriptFunction|void|SetValue|(string key, string value);|Set a value as 'key'='value'.|5=Space.Persistence.SetValue("MyValue", "Hello World");}}
{{ScriptFunction|string|GetValue|(string key);|Retrieve the value assigned to 'key'.}}
+
{{ScriptFunction|string|GetValue|(string key);|Retrieve the value assigned to 'key'.|5=Space.Log(Space.Persistence.GetValue("MyValue"));}}
  
 
==Miscellaneous==
 
==Miscellaneous==
 
{{ScriptFunction|void|UpdateValue|(Action onComplete);|Call the onComplete function upon the value being stored.}}
 
{{ScriptFunction|void|UpdateValue|(Action onComplete);|Call the onComplete function upon the value being stored.}}

Revision as of 20:24, 19 April 2017

The SPersistence class allows you to store persistent data to the region.

Members

Get/Set Values

SetValue

void SetValue (string key, string value);

No documentation

Space.Persistence.SetValue("MyValue", "Hello World");


GetValue

string GetValue (string key);

Retrieve the value assigned to 'key'.

Space.Log(Space.Persistence.GetValue("MyValue"));


Miscellaneous

UpdateValue

void UpdateValue (Action onComplete);

Call the onComplete function upon the value being stored.

No example provided yet