Hi everyone, I’m adapting the NetworkLobbyManager just to learn how to use it in the future, or to create my own.
The thing is, I did override OnLobbyServerPlayersReady() in order to add a countdown when players hit ready. Now it looks like this (note that I commented the base.OnLobbyServerPlayersReady() on purpose)
public override void OnLobbyServerPlayersReady()
{
StartGameTempo = (float)Network.time + TimetoStartGame;
PlayerConfigPanel.TimeToStart = StartGameTempo;
TimeTicking = true;
PlayerConfigPanel.TimeTicking = TimeTicking;
//base.OnLobbyServerPlayersReady();
}
And I load the next Scene calling ServerChangeScene() (I didn’t override this one)
Now, everything works fine, but when it loads the game scene (after lobby and countdown) NetworkLobbyManager creates the gameObjects for players, but immediately after it deletes them.
I guess I miss something overriding OnLobbyServerPlayersReady() and I would like to know what it is (Some kind of register the object spawned, or give it an attribute so the LobbyManager stops refusing him, I dont know!). Could somebody please help me?
Also, would be great if could see the NetworkLobbyManager source code to understand whats he doing under the hood, it would REALLY speed up my learning. Is it possible?
If you need to know anything else, please let me know!
Thanks,
Regards