diff --git a/Assets/Mirror/Examples/TestNT/Prefabs/Bot.prefab b/Assets/Mirror/Examples/TestNT/Prefabs/Bot.prefab index b816f3c66..83605710d 100644 --- a/Assets/Mirror/Examples/TestNT/Prefabs/Bot.prefab +++ b/Assets/Mirror/Examples/TestNT/Prefabs/Bot.prefab @@ -382,7 +382,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &2277275783330066836 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/TestNT/Prefabs/NPC.prefab b/Assets/Mirror/Examples/TestNT/Prefabs/NPC.prefab index 83a2283e1..9e4ed67d3 100644 --- a/Assets/Mirror/Examples/TestNT/Prefabs/NPC.prefab +++ b/Assets/Mirror/Examples/TestNT/Prefabs/NPC.prefab @@ -908,7 +908,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &7700490921528434849 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/TestNT/Prefabs/Player.prefab b/Assets/Mirror/Examples/TestNT/Prefabs/Player.prefab index 43401c3c0..610513b3d 100644 --- a/Assets/Mirror/Examples/TestNT/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/TestNT/Prefabs/Player.prefab @@ -189,7 +189,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &799074667234622661 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity b/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity index 11eb1a085..6447f481c 100644 --- a/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity +++ b/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity @@ -930,8 +930,6 @@ MonoBehaviour: m_Options: - m_Text: mirror.clevertech.net m_Image: {fileID: 0} - - m_Text: mirrornt.idev.dl.je - m_Image: {fileID: 0} - m_Text: localhost m_Image: {fileID: 0} m_OnValueChanged: @@ -1539,6 +1537,7 @@ GameObject: - component: {fileID: 821201140} - component: {fileID: 821201139} - component: {fileID: 821201141} + - component: {fileID: 821201142} m_Layer: 0 m_Name: NetworkManager m_TagString: Untagged @@ -1558,7 +1557,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0110f245bfcfc7d459681f7bd9ebc590, type: 3} m_Name: m_EditorClassIdentifier: - port: 7777 + port: 27777 maxMessageSize: 16384 handshakeMaxSize: 3000 noDelay: 1 @@ -1568,8 +1567,8 @@ MonoBehaviour: clientMaxMessagesPerTick: 1000 batchSend: 0 waitBeforeSend: 0 - clientUseWss: 1 - sslEnabled: 1 + clientUseWss: 0 + sslEnabled: 0 sslCertJson: ./cert.json sslProtocols: 0 _logLevels: 3 @@ -1710,6 +1709,18 @@ MonoBehaviour: serverReceivedBytesPerSecond: 0 serverSentPacketsPerSecond: 0 serverSentBytesPerSecond: 0 +--- !u!114 &821201142 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 821201133} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bc5b42cbfc38b1c4d86fd25905b19e29, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &920376379 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/TestNT/Scripts/TestNTNetworkManager.cs b/Assets/Mirror/Examples/TestNT/Scripts/TestNTNetworkManager.cs index b5b6ed3ad..a97ccf897 100644 --- a/Assets/Mirror/Examples/TestNT/Scripts/TestNTNetworkManager.cs +++ b/Assets/Mirror/Examples/TestNT/Scripts/TestNTNetworkManager.cs @@ -35,17 +35,12 @@ public void OnSelectServer(int server) if (server == 0) { SetHostname("mirror.clevertech.net"); - ((Mirror.SimpleWeb.SimpleWebTransport)transport).port = 7778; + ((SimpleWebTransport)transport).port = 7777; } if (server == 1) - { - SetHostname("mirrornt.idev.dl.je"); - ((Mirror.SimpleWeb.SimpleWebTransport)transport).port = 443; - } - if (server == 2) { SetHostname("localhost"); - ((Mirror.SimpleWeb.SimpleWebTransport)transport).port = 7778; + ((SimpleWebTransport)transport).port = 27777; } } @@ -69,8 +64,8 @@ public override void Start() // only start server or client, never both else if (autoConnectClientBuild) { - ((TestNTNetworkAuthenticator)authenticator).SetPlayername("Bot", true); ProcessCmdLineArgs(); + ((TestNTNetworkAuthenticator)authenticator).SetPlayername($"Bot[{sendRate}] ", true); ((SimpleWebTransport)Transport.active).sslEnabled = true; ((SimpleWebTransport)Transport.active).clientUseWss = true; StartClient(); @@ -82,9 +77,15 @@ public override void Start() void ProcessCmdLineArgs() { foreach (string arg in Environment.GetCommandLineArgs()) + { if (arg.StartsWith("/p:", StringComparison.InvariantCultureIgnoreCase)) if (ushort.TryParse(arg.Remove(0, 3), out ushort port)) ((SimpleWebTransport)Transport.active).port = port; + + if (arg.StartsWith("/r:", StringComparison.InvariantCultureIgnoreCase)) + if (int.TryParse(arg.Remove(0, 3), out sendRate)) + Application.targetFrameRate = sendRate; + } } #endif