perf: batching is now enabled by default

This commit is contained in:
vis2k 2021-03-09 15:17:29 +08:00
parent 1b6f898a5a
commit 665b1c2156
2 changed files with 4 additions and 3 deletions

View File

@ -56,8 +56,8 @@ public class NetworkManager : MonoBehaviour
public int serverTickRate = 30;
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
[Tooltip("Batching greatly reduces CPU & Transport load, but increases latency by one frame time. Use for high scale games / CPU intensive games. Don't use for fast paced games.")]
public bool serverBatching;
[Tooltip("Batch message and send them out in LateUpdate (or after batchInterval). This is pretty much always a good idea.")]
public bool serverBatching = true;
/// <summary>
/// batching from server to client.

View File

@ -34,7 +34,8 @@ public static class NetworkServer
public static bool active { get; internal set; }
/// <summary>batch messages and send them out in LateUpdate (or after batchInterval)</summary>
public static bool batching;
// (this is pretty much always a good idea)
public static bool batching = true;
/// <summary>interval in seconds used for batching. 0 means send in every LateUpdate.</summary>
public static float batchInterval = 0;