![]() |
CotC C# SDK for Unity
v1.4.0.1
Making social games is easy !
|
Allows to manipulate the gamer properties.
Public Member Functions | |
GamerProperties | Domain (string domain) |
Sets the domain affected by this object. You should typically use it this way: gamer.Properties.Domain("private").Post(...); More... | |
Promise< Bundle > | GetKey (string key) |
Retrieves an individual key from the gamer properties. More... | |
Promise< Bundle > | GetAll () |
Retrieves all the properties of the gamer. More... | |
Promise< Done > | SetKey (string key, Bundle value) |
Sets a single key from the user properties. More... | |
Promise< Done > | SetAll (Bundle properties) |
Sets all keys at once. More... | |
Promise< Done > | RemoveKey (string key) |
Removes a single key from the user properties. More... | |
Promise< Done > | RemoveAll () |
Remove all properties for the user. More... | |
GamerProperties CotcSdk.GamerProperties.Domain | ( | string | domain | ) |
Sets the domain affected by this object. You should typically use it this way: gamer.Properties.Domain("private").Post(...);
domain | Optional domain on which to scope the properties. Default to private if unmodified. |
Retrieves all the properties of the gamer.
string value = result.Value["key"];
. Bundle handles automatic conversions as well, so if you passed an integer, you may as well fetch it as a string and vice versa.Retrieves an individual key from the gamer properties.
key | The name of the key to be fetched. |
Remove all properties for the user.
Removes a single key from the user properties.
key | The name of the key to remove. |
Sets all keys at once.
properties | A bundle of key/value properties to set. An example is Bundle.CreateObject("key", "value") . |
Sets a single key from the user properties.
key | The name of the key to set the value for. |
value | The value to set. As usual with bundles, casting is implicitly done, so you may as well call this method passing an integer or string as value for instance. |