mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
breaking: force enable batching to prepare for TickBatching
This commit is contained in:
parent
7eacdaa96b
commit
72f915a456
@ -88,8 +88,9 @@ public static class NetworkClient
|
|||||||
new Dictionary<ulong, NetworkIdentity>();
|
new Dictionary<ulong, NetworkIdentity>();
|
||||||
|
|
||||||
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
|
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
|
||||||
// (this is pretty much always a good idea)
|
// => always enabled so we can do TickBatching
|
||||||
public static bool batching = true;
|
// => can still be disabled internally for tests atm
|
||||||
|
internal static bool batching = true;
|
||||||
|
|
||||||
static Unbatcher unbatcher = new Unbatcher();
|
static Unbatcher unbatcher = new Unbatcher();
|
||||||
|
|
||||||
|
@ -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.")]
|
[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;
|
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>
|
/// <summary>Automatically switch to this scene upon going offline (on start / on disconnect / on shutdown).</summary>
|
||||||
[Header("Scene Management")]
|
[Header("Scene Management")]
|
||||||
[Scene]
|
[Scene]
|
||||||
@ -246,9 +242,6 @@ void SetupServer()
|
|||||||
|
|
||||||
ConfigureServerFrameRate();
|
ConfigureServerFrameRate();
|
||||||
|
|
||||||
// batching
|
|
||||||
NetworkServer.batching = batching;
|
|
||||||
|
|
||||||
// Copy auto-disconnect settings to NetworkServer
|
// Copy auto-disconnect settings to NetworkServer
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
NetworkServer.disconnectInactiveTimeout = disconnectInactiveTimeout;
|
NetworkServer.disconnectInactiveTimeout = disconnectInactiveTimeout;
|
||||||
@ -326,9 +319,6 @@ public void StartClient()
|
|||||||
|
|
||||||
mode = NetworkManagerMode.ClientOnly;
|
mode = NetworkManagerMode.ClientOnly;
|
||||||
|
|
||||||
// batching
|
|
||||||
NetworkClient.batching = batching;
|
|
||||||
|
|
||||||
InitializeSingleton();
|
InitializeSingleton();
|
||||||
|
|
||||||
if (runInBackground)
|
if (runInBackground)
|
||||||
|
@ -34,8 +34,9 @@ public static class NetworkServer
|
|||||||
public static bool active { get; internal set; }
|
public static bool active { get; internal set; }
|
||||||
|
|
||||||
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
|
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
|
||||||
// (this is pretty much always a good idea)
|
// => always enabled so we can do TickBatching
|
||||||
public static bool batching = true;
|
// => can still be disabled internally for tests atm
|
||||||
|
internal static bool batching = true;
|
||||||
|
|
||||||
// scene loading
|
// scene loading
|
||||||
public static bool isLoadingScene;
|
public static bool isLoadingScene;
|
||||||
|
Loading…
Reference in New Issue
Block a user