Unity Lobby, player get disconnected if game has already started.
Unity lobby, player get disconnected if game has already started. But if they join the server before the game has started, they don't get disconected and can play normaly.
Answer by crazybeek · Jul 06, 2016 at 04:06 PM
In your custom networklobbymanager you can add your own implementation for OnServerConnect() In your case you don't disconnect if the loadedscene != lobbyscene.
public override void OnServerConnect(NetworkConnection conn)
{
if (numPlayers >= maxPlayers)
{
conn.Disconnect();
return;
}
// cannot join game in progress
/*string loadedSceneName = SceneManager.GetSceneAt(0).name;
if (loadedSceneName != lobbyScene)
{
conn.Disconnect();
return;
}*/
//base.OnServerConnect(conn);
OnLobbyServerConnect(conn);
}
A$$anonymous$$AZING. Builds with an error but still works. So much better than messing with dll files. $$anonymous$$ey words to help other people looking on google: "Hot-joining". Hot Join. Unity. In-progress. Join. Server. Lobby.
Your answer
Follow this Question
Related Questions
OnLobbyServerSceneLoadedForPlayer not called for client 1 Answer
How to spawn a different game player prefab based on player choice with Network Lobby Manager? 0 Answers
How to improve voice quality in Photon Voice? 1 Answer
Client choice of prefabs on a NetworkLobbyManager 0 Answers
Using Transform Component and selfmade interface in an Network Command ? 0 Answers