This commit is contained in:
MrGadget1024 2023-02-12 07:52:50 -05:00
parent a0034fb01c
commit 456e7eefdd
5 changed files with 28 additions and 16 deletions

View File

@ -382,7 +382,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &2277275783330066836 --- !u!224 &2277275783330066836
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -908,7 +908,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &7700490921528434849 --- !u!224 &7700490921528434849
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -189,7 +189,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &799074667234622661 --- !u!224 &799074667234622661
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -930,8 +930,6 @@ MonoBehaviour:
m_Options: m_Options:
- m_Text: mirror.clevertech.net - m_Text: mirror.clevertech.net
m_Image: {fileID: 0} m_Image: {fileID: 0}
- m_Text: mirrornt.idev.dl.je
m_Image: {fileID: 0}
- m_Text: localhost - m_Text: localhost
m_Image: {fileID: 0} m_Image: {fileID: 0}
m_OnValueChanged: m_OnValueChanged:
@ -1539,6 +1537,7 @@ GameObject:
- component: {fileID: 821201140} - component: {fileID: 821201140}
- component: {fileID: 821201139} - component: {fileID: 821201139}
- component: {fileID: 821201141} - component: {fileID: 821201141}
- component: {fileID: 821201142}
m_Layer: 0 m_Layer: 0
m_Name: NetworkManager m_Name: NetworkManager
m_TagString: Untagged m_TagString: Untagged
@ -1558,7 +1557,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0110f245bfcfc7d459681f7bd9ebc590, type: 3} m_Script: {fileID: 11500000, guid: 0110f245bfcfc7d459681f7bd9ebc590, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
port: 7777 port: 27777
maxMessageSize: 16384 maxMessageSize: 16384
handshakeMaxSize: 3000 handshakeMaxSize: 3000
noDelay: 1 noDelay: 1
@ -1568,8 +1567,8 @@ MonoBehaviour:
clientMaxMessagesPerTick: 1000 clientMaxMessagesPerTick: 1000
batchSend: 0 batchSend: 0
waitBeforeSend: 0 waitBeforeSend: 0
clientUseWss: 1 clientUseWss: 0
sslEnabled: 1 sslEnabled: 0
sslCertJson: ./cert.json sslCertJson: ./cert.json
sslProtocols: 0 sslProtocols: 0
_logLevels: 3 _logLevels: 3
@ -1710,6 +1709,18 @@ MonoBehaviour:
serverReceivedBytesPerSecond: 0 serverReceivedBytesPerSecond: 0
serverSentPacketsPerSecond: 0 serverSentPacketsPerSecond: 0
serverSentBytesPerSecond: 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 --- !u!1 &920376379
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -35,17 +35,12 @@ public void OnSelectServer(int server)
if (server == 0) if (server == 0)
{ {
SetHostname("mirror.clevertech.net"); SetHostname("mirror.clevertech.net");
((Mirror.SimpleWeb.SimpleWebTransport)transport).port = 7778; ((SimpleWebTransport)transport).port = 7777;
} }
if (server == 1) if (server == 1)
{
SetHostname("mirrornt.idev.dl.je");
((Mirror.SimpleWeb.SimpleWebTransport)transport).port = 443;
}
if (server == 2)
{ {
SetHostname("localhost"); 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 // only start server or client, never both
else if (autoConnectClientBuild) else if (autoConnectClientBuild)
{ {
((TestNTNetworkAuthenticator)authenticator).SetPlayername("Bot", true);
ProcessCmdLineArgs(); ProcessCmdLineArgs();
((TestNTNetworkAuthenticator)authenticator).SetPlayername($"Bot[{sendRate}] ", true);
((SimpleWebTransport)Transport.active).sslEnabled = true; ((SimpleWebTransport)Transport.active).sslEnabled = true;
((SimpleWebTransport)Transport.active).clientUseWss = true; ((SimpleWebTransport)Transport.active).clientUseWss = true;
StartClient(); StartClient();
@ -82,9 +77,15 @@ public override void Start()
void ProcessCmdLineArgs() void ProcessCmdLineArgs()
{ {
foreach (string arg in Environment.GetCommandLineArgs()) foreach (string arg in Environment.GetCommandLineArgs())
{
if (arg.StartsWith("/p:", StringComparison.InvariantCultureIgnoreCase)) if (arg.StartsWith("/p:", StringComparison.InvariantCultureIgnoreCase))
if (ushort.TryParse(arg.Remove(0, 3), out ushort port)) if (ushort.TryParse(arg.Remove(0, 3), out ushort port))
((SimpleWebTransport)Transport.active).port = 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 #endif