Api Sandbox NetworkHelper
class

NetworkHelper

public sealed class NetworkHelper : Component

Creates a networked game lobby and assigns player prefabs to connected clients.

Constructors

NetworkHelper()

Properties

Name Type Description
StartServer Boolean Create a server (if we're not joining one)
PlayerPrefab GameObject The prefab to spawn for the player to control.
SpawnPoints List<GameObject> A list of points to choose from randomly to spawn the player in. If not set, we'll spawn at the location of the NetworkHelper object.

Methods

virtual Void OnActive(Connection channel)

A client is fully connected to the server. This is called on the host.

Assembly: Base Library Namespace: Sandbox Full Name: Sandbox.NetworkHelper