mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix test on older unity
This commit is contained in:
parent
bf49b6c923
commit
ae9ecf3483
@ -25,10 +25,7 @@ protected NetworkIdentity CreatePlayerNI(int connectionId, Action<NetworkIdentit
|
|||||||
NetworkConnectionToClient connection = new NetworkConnectionToClient(connectionId);
|
NetworkConnectionToClient connection = new NetworkConnectionToClient(connectionId);
|
||||||
connection.isAuthenticated = true;
|
connection.isAuthenticated = true;
|
||||||
connection.identity = identity;
|
connection.identity = identity;
|
||||||
if (!NetworkServer.connections.TryAdd(connectionId, connection))
|
NetworkServer.connections.Add(connectionId, connection);
|
||||||
{
|
|
||||||
throw new Exception("Duplicate connection id");
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkServer.Spawn(gameObject, connection);
|
NetworkServer.Spawn(gameObject, connection);
|
||||||
NetworkServer.SetClientReady(connection); // AddPlayerForConnection also calls this!
|
NetworkServer.SetClientReady(connection); // AddPlayerForConnection also calls this!
|
||||||
|
Loading…
Reference in New Issue
Block a user