All pages
Powered by GitBook
1 of 1

Loading...

SNetworking

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

SendEvent

void SendEvent (string eventName)

Send a networking event event that will be received by other components in the scene with the same network name.

Parameter
Type
Description

ReceiveEvent

void ReceiveEvent (string eventName)

Invoke an event on the networking component. Normally not necessary to do manually, as this happens automatically when receiving a matching event over the network, but may be useful to initialize a state.

Parameter
Type
Description

Properties

Enabled

bool Enabled get set

Whether the simple networking component is Enabled or not

Instanced

bool Instanced get

Returns whether this networking component is instanced or not.

NetworkName

string NetworkName get set

Returns or sets the name of the network. Network name must be at least 20 characters long without trailing or leading spaces.

Ready

bool Ready get

Return whether the networking component is ready to send or not (is initialized).

EventCount

int EventCount get

Return the number of events this component is waiting to receive.

EventNames

string[] EventNames get

Return a list of names of events that this component will receive.

GameObject

GameObject get

Property Description

void SendEvent (string eventName)

void ReceiveEvent (string eventName)

bool Enabled get set

bool Instanced get

string NetworkName get set

bool Ready get

int EventCount get

string[] EventNames get

SGameObject GameObject get

SGameObject
Space.Host.ExecutingObject.Networking.SendEvent("Light On")
Space.Host.ExecutingObject.Networking.ReceiveEvent("Light On")
Space.Host.ExecutingObject.Networking.Enabled = true
isInstanced = Space.Host.ExecutingObject.Networking.Instanced
Space.Host.ExecutingObject.Networking.NetworkName = "Example Network Name 1"
isReady = Space.Host.ExecutingObject.Networking.Ready
count = Space.Host.ExecutingObject.Networking.EventCount
tableOfNames = Space.Host.ExecutingObject.Networking.EventNames
theGameObject = Space.Host.ExecutingObject.Networking.GameObject