Hello,
I have a button on a canvas which gets activated when a player enters a sector portal.
The canvas a has a button to continue to next sector and moves all players to new spawn point.
However this only works for the player who is the server.
the player who connects to the other player can activate the button(see it clicking but does nothing)
The code is along the lines of this:
public void SectorButtonClick(){
CmdNextSector();
}
[Cmd]
void CmdNextSector(){
RpcCloseCanvas();
}
[ClientRpc]
void RpcCloseCanvas(){
…
}
Is this the right process for a the player who connects to the player who is hosting to call the command to close the canvas and activate the logic to move the players.
Works fine if you are hosting the game.
Any suggestions welcome thanks
Daniel