Lua API
On this page

UBNetModule

classubnet
Inherits from

Access to UBNet. This allows you to talk to clients on the same computer / ubnet instance.

Fields:

IsConnected boolean

read only

Wether you are currently connected to the UBNet server.

Constructors:

New() :

Methods:

Dispose() : nil

Returns:nil

GetClients() : UBNetClientInfo[]

Get a list of all connected ubnet clients. This does not include yourself.

GetClients(filterFunction: fun(UBNetClientInfo) : nil ) : UBNetClientInfo[]

Get a list of all connected ubnet clients that match the specified function filter. This does not include yourself.

Parameters:
NameTypeDefaultSummary
filterFunctionfun(UBNetClientInfo) : nil

GetClients(tag: string) : UBNetClientInfo[]

Get a list of all connected ubnet clients that have the specified tag. This does not include yourself.

Parameters:
NameTypeDefaultSummary
tagstring

GetClients(type: ClientType) : UBNetClientInfo[]

Get a list of all connected ubnet clients of the specified type. This does not include yourself.

Parameters:
NameTypeDefaultSummary
typeClientType

GetPropertyKeys(source)

PublishToChannel(channel,message) channel string , message string

SubscribeToChannel(channel,handler) channel string , handler function

ToString()

UnsubscribeFromChannel(channel,handler) channel string , handler function