// NetworkIdentity.UNetStaticUpdate is called from UnityEngine while LLAPI network is active.
 // if we want TCP then we need to call it manually. probably best from NetworkManager, although this means
 // that we can't use NetworkServer/NetworkClient without a NetworkManager invoking Update anymore.
 //
 // virtual so that inheriting classes' LateUpdate() can call base.LateUpdate() too
 public virtual void LateUpdate()
 {
     // call it while the NetworkManager exists.
     // -> we don't only call while Client/Server.Connected, because then we would stop if disconnected and the
     //    NetworkClient wouldn't receive the last Disconnect event, result in all kinds of issues
     NetworkServer.Update();
     NetworkClient.Update();
     UpdateScene();
 }
Beispiel #2
0
 // this is invoked by the UnityEngine
 public static void UNetStaticUpdate()
 {
     NetworkServer.Update();
     NetworkClient.UpdateClients();
     NetworkManager.UpdateScene();
 }