mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
LLAPITransport.ClientConnect: changed AddHost(topology) to AddHost(topology, 0) so it works in standalone AND webgl
This commit is contained in:
parent
aa2c004615
commit
6a6f942f7f
@ -79,7 +79,11 @@ public bool ClientConnected()
|
|||||||
public void ClientConnect(string address, int port)
|
public void ClientConnect(string address, int port)
|
||||||
{
|
{
|
||||||
HostTopology hostTopology = new HostTopology(connectionConfig, 1);
|
HostTopology hostTopology = new HostTopology(connectionConfig, 1);
|
||||||
clientId = NetworkTransport.AddHost(hostTopology);
|
|
||||||
|
// important:
|
||||||
|
// AddHost(topology) doesn't work in WebGL.
|
||||||
|
// AddHost(topology, port) works in standalone and webgl if port=0
|
||||||
|
clientId = NetworkTransport.AddHost(hostTopology, 0);
|
||||||
|
|
||||||
clientConnectionId = NetworkTransport.Connect(clientId, address, port, 0, out error);
|
clientConnectionId = NetworkTransport.Connect(clientId, address, port, 0, out error);
|
||||||
NetworkError networkError = (NetworkError) error;
|
NetworkError networkError = (NetworkError) error;
|
||||||
|
Loading…
Reference in New Issue
Block a user