mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(SWT): Port get/set based on platform
This commit is contained in:
parent
dcccaa98f8
commit
af5627e696
@ -52,7 +52,31 @@ public class SimpleWebTransport : Transport, PortTransport
|
||||
|
||||
[Tooltip("Port to use for server")]
|
||||
public ushort port = 7778;
|
||||
public ushort Port { get => port; set => port = value; }
|
||||
public ushort Port
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_WEBGL
|
||||
if (clientWebsocketSettings.ClientPortOption == WebsocketPortOption.SpecifyPort)
|
||||
return clientWebsocketSettings.CustomClientPort;
|
||||
else
|
||||
return port;
|
||||
#else
|
||||
return port;
|
||||
#endif
|
||||
}
|
||||
set
|
||||
{
|
||||
#if UNITY_WEBGL
|
||||
if (clientWebsocketSettings.ClientPortOption == WebsocketPortOption.SpecifyPort)
|
||||
clientWebsocketSettings.CustomClientPort = value;
|
||||
else
|
||||
port = value;
|
||||
#else
|
||||
port = value;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[Tooltip("Groups messages in queue before calling Stream.Send")]
|
||||
public bool batchSend = true;
|
||||
|
Loading…
Reference in New Issue
Block a user