/// <summary> /// Registers this add-on with the specified network client. /// </summary> /// <param name="type">The type of client with which to register this add-on.</param> public virtual void RegisterAddon(ClientAddonType type) { this.type = type; switch (type) { case ClientAddonType.MasterServer: networkClient = ClientAPI.masterServerClient; break; case ClientAddonType.Game: networkClient = ClientAPI.gameClient; break; } RegisterNetworkHandlers(); }
/// <summary> /// Unity's Start method. /// </summary> protected virtual void Start() { masterServerClient = new BaseNetworkClient(new NetworkClient(), "Anonymous"); SetupDefaultMasterServerClientAddons(); }