Example #1
0
 public override void OnStartClient()
 {
     base.OnStartClient();
     // This doesn't require authentication, as we want the user to authenticate with the Login Server first (which we get sent)
     NetworkClient.RegisterHandler <LoginServerMessage>(OnLoginDataMessage, false);
 }
 // this is invoked by the UnityEngine
 public static void UNetStaticUpdate()
 {
     NetworkServer.Update();
     NetworkClient.UpdateClients();
     NetworkManager.UpdateScene();
 }
Example #3
0
 /// <summary>
 /// This replaces the player object for a connection with a different player object. The old player object is not destroyed.
 /// <para>If a connection already has a player object, this can be used to replace that object with a different player object. This does NOT change the ready state of the connection, so it can safely be used while changing scenes.</para>
 /// </summary>
 /// <param name="conn">Connection which is adding the player.</param>
 /// <param name="client">Client associated to the player.</param>
 /// <param name="player">Player object spawned for the player.</param>
 /// <param name="keepAuthority">Does the previous player remain attached to this connection?</param>
 /// <returns></returns>
 public bool ReplacePlayerForConnection(INetworkConnection conn, NetworkClient client, GameObject player, bool keepAuthority = false)
 {
     return(InternalReplacePlayerForConnection(conn, client, player, keepAuthority));
 }
Example #4
0
 public virtual void OnStartClient(NetworkClient client)
 {
 }