I’ve launched the menu and every time i host a lobby, the start button does not become active.
I even went into the code and added debugs for the methods and
OnServererAddPlayer isnt called when the lobbys starts.
neither does OnServerConnect.
Hi there, are you hosting in a build or in the editor? Is your second player joining from the build or the editor?
Is AuthorityHandlePartyOwnerStateUpdated getting called in the RTS Player on the host? That looks to be the initial trigger for showing the start button.
Okay let’s follow that line of thought.
AuthorityHandlePartyOwnerStateUpdated is triggered by a syncVar hook, so first thing is to check that the hook is setup correctly. Make sure that is spelled correctly and everything.
Next, make sure that value is being updated correctly to trigger the hook. So in the OnServerAddPlayer method in the RTSNetowrkManager, check that it has the line at the end: player.SetPartyOwner(Players.Count == 1);
Should have that double equation to make sure player 1 is always the host and has access to the start button.
Let me know if that is all correct.
Side note, does your OnClientConnect() include the base.OnClientConnect()?
So onServerAddPlayer is the next up the chain, which is what you said. That is being called by Mirror, so it shouldn’t be affected by your code. Are there any errors in the console?
Can you see your players being instantiated in the hierarchy in the editor? Is your player prefab setup correctly in the network manager in your menu scene, and included under registered spawnable prefabs?