Skip to content

Commit f73ae86

Browse files
authored
Merge pull request #60 from dylanpdx/master
Fix OnConnectionStatusChanged not being called on server builds
2 parents e53b074 + 96767d1 commit f73ae86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

com.mirror.steamworks.net/NextServer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ private NextServer(int maxConnections)
2929
connToMirrorID = new BidirectionalDictionary<HSteamNetConnection, int>();
3030
steamIDToMirrorID = new BidirectionalDictionary<CSteamID, int>();
3131
nextConnectionID = 1;
32+
#if UNITY_SERVER
33+
c_onConnectionChange = Callback<SteamNetConnectionStatusChangedCallback_t>.CreateGameServer(OnConnectionStatusChanged);
34+
#else
3235
c_onConnectionChange = Callback<SteamNetConnectionStatusChangedCallback_t>.Create(OnConnectionStatusChanged);
36+
#endif
3337
}
3438

3539
public static NextServer CreateServer(FizzySteamworks transport, int maxConnections)

0 commit comments

Comments
 (0)