|
|
(47 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | The SNetwork class allows you to send messages to other users in the region, and persist/retrieve variables which have been stored within the region.
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/network/snetwork |
− | | + | |
− | ==Members==
| + | |
− | {{ScriptFunction|void|SendNetworkMessage|(string key, IDictionary<object,object>);|Sends a networked message to every client with a subscriber listening on 'key'. The message itself can be a dictionary/table containing two columns and any network serializable type (string, float, int, byte, bool and arrays of those types)}}
| + | |
− | {{ScriptFunction|void|SetShardProperty|(string key, string value);|Sets a property named 'key' of the region to 'value'. Will persist until the region is shut down or restarted. (Use SPersistence for longer term storage)}}
| + | |
− | {{ScriptFunction|string|GetShardProperty|(string key);|Gets a previously set key.}}
| + | |
− | {{ScriptFunction|void|SubscribeToNetwork|(string key, Action<SNetworkMessage> callback);|Subscribes to network messages on 'key', will fire a [[Scripting/SNetworkMessage]] whenever a matching message is received}}
| + | |
− | | + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |
Latest revision as of 07:01, 19 September 2022
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/network/snetwork