Api Network
class

Network

public static abstract sealed class Network

Properties

Name Type Description
Active static Boolean True if the network system is active
Hosting static Boolean True if the network system is active and we're the host
Client static Boolean True if the network system is active and we're the host
HostPrivacy static LobbyPrivacy Determines who can join a lobby hosted from the editor. Should only be set before creating a lobby. Persists between lobbies.
Channels static Connection[] Return all of the channels on this connection. If you're the host, it should return all client connections. If you're the client, it should return empty - unless you're in a p2p session (lobby). Returns empty if you're not connected
Sockets static NetworkSocket[] Return all of the sockets on this connection. If you're the host, it should return all active sockets. If you're the client, it should return empty - unless you're in a p2p session (lobby). Returns empty if you're not connected

Methods

static Void Disconnect()

Disconnect from the current network session

static Void Connect(String address)

Connenct to a network address

static Void StartHosting()

Start hosting a lobby. If we're not already in play mode, we'll enter play mode first.

Assembly: Sandbox.Tools Declaring Type: EditorUtility Full Name: Editor.EditorUtility.Network