NetworkManager.MaxConnections default increased from 4 to 100 (#2569)

This commit is contained in:
vis2k 2021-02-08 10:11:16 +08:00 committed by GitHub
parent 41753fc83c
commit e98a12b499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 10 deletions

View File

@ -1747,11 +1747,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 1661834280}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -185,11 +185,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 249891955}
networkAddress: localhost
maxConnections: 16
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -2942,11 +2942,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 1783103023}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -96,11 +96,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene: Assets/Mirror/Examples/Cloud/TanksWithListServer/Scenes/ListServerLobbySceneTanks.unity
onlineScene: Assets/Mirror/Examples/Tanks/Scenes/Scene.unity
transport: {fileID: 5098311272746915055}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}
@ -130,4 +132,5 @@ MonoBehaviour:
SendWindowSize: 128
ReceiveWindowSize: 128
debugLog: 0
debugGUI: 0
statisticsGUI: 0
statisticsLog: 0

View File

@ -416,11 +416,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 1556883244}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -262,11 +262,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 492096634}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -243,6 +243,8 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene: Assets/Mirror/Examples/Room/Scenes/OfflineScene.unity
onlineScene: Assets/Mirror/Examples/Room/Scenes/RoomScene.unity
transport: {fileID: 2008127830}

View File

@ -428,11 +428,13 @@ MonoBehaviour:
autoStartServerBuild: 1
showDebugMessages: 0
serverTickRate: 30
serverBatching: 0
serverBatchInterval: 0
offlineScene:
onlineScene:
transport: {fileID: 1282001521}
networkAddress: localhost
maxConnections: 4
maxConnections: 100
disconnectInactiveConnections: 0
disconnectInactiveTimeout: 60
authenticator: {fileID: 0}

View File

@ -123,7 +123,7 @@ public class NetworkManager : MonoBehaviour
/// </summary>
[FormerlySerializedAs("m_MaxConnections")]
[Tooltip("Maximum number of concurrent connections.")]
public int maxConnections = 4;
public int maxConnections = 100;
// This value is passed to NetworkServer in SetupServer
/// <summary>

View File

@ -34,7 +34,7 @@ public void VariableTest()
Assert.That(manager.serverTickRate, Is.EqualTo(30));
Assert.That(manager.offlineScene, Is.Empty);
Assert.That(manager.networkAddress, Is.EqualTo("localhost"));
Assert.That(manager.maxConnections, Is.EqualTo(4));
Assert.That(manager.maxConnections, Is.EqualTo(100));
Assert.That(manager.autoCreatePlayer, Is.True);
Assert.That(manager.spawnPrefabs, Is.Empty);
Assert.That(manager.numPlayers, Is.Zero);