breaking: force enable batching to prepare for TickBatching

This commit is contained in:
vis2k 2021-06-14 14:54:00 +08:00
parent 7eacdaa96b
commit 72f915a456
3 changed files with 6 additions and 14 deletions

View File

@ -88,8 +88,9 @@ public static class NetworkClient
new Dictionary<ulong, NetworkIdentity>();
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
// (this is pretty much always a good idea)
public static bool batching = true;
// => always enabled so we can do TickBatching
// => can still be disabled internally for tests atm
internal static bool batching = true;
static Unbatcher unbatcher = new Unbatcher();

View File

@ -45,10 +45,6 @@ public class NetworkManager : MonoBehaviour
[Tooltip("Server Update frequency, per second. Use around 60Hz for fast paced games like Counter-Strike to minimize latency. Use around 30Hz for games like WoW to minimize computations. Use around 1-10Hz for slow paced games like EVE.")]
public int serverTickRate = 30;
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
[Tooltip("Batch message and send them out in LateUpdate (or after batchInterval). This is pretty much always a good idea.")]
[FormerlySerializedAs("serverBatching")] public bool batching = true;
/// <summary>Automatically switch to this scene upon going offline (on start / on disconnect / on shutdown).</summary>
[Header("Scene Management")]
[Scene]
@ -246,9 +242,6 @@ void SetupServer()
ConfigureServerFrameRate();
// batching
NetworkServer.batching = batching;
// Copy auto-disconnect settings to NetworkServer
#pragma warning disable 618
NetworkServer.disconnectInactiveTimeout = disconnectInactiveTimeout;
@ -326,9 +319,6 @@ public void StartClient()
mode = NetworkManagerMode.ClientOnly;
// batching
NetworkClient.batching = batching;
InitializeSingleton();
if (runInBackground)

View File

@ -34,8 +34,9 @@ public static class NetworkServer
public static bool active { get; internal set; }
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
// (this is pretty much always a good idea)
public static bool batching = true;
// => always enabled so we can do TickBatching
// => can still be disabled internally for tests atm
internal static bool batching = true;
// scene loading
public static bool isLoadingScene;