Hi, i tried to instantiate my player object using ClientScene.AddPlayer and make necessary change in OnServerAddPlayer.
The problem is when i need to send my player parameter to other client using [Command] and [ClientRpc], ClientRpc did not executed.
This some snippet of my player networkbehavior
public override void OnStartLocalPlayer() {
if (hasAuthority)
CmdCreateChar();
}
[Command]
void CmdCreateChar()
{
print("client command me to execute this");
RpcCreateChar();
}
[ClientRpc] //never called
void RpcCreateChar()
{
print("Server send this rpc to execute on all client");
}
Any hint whats wrong?