- Home /
Mirror multiplayer Command issue
When a client dies I want to tell every other client that it did, and which one it was. Currently my code looks like this:
[Command]
public void CmdHaveLost(int lost_id)
{
RpcHaveLost(lost_id);
}
[ClientRpc]
void RpcHaveLost(int lost_id)
{
print(lost_id);
}
This works when a client that is not the host dies, but when the host dies, nothing happens. I've tried putting print statements in CmdHaveLost and right before it is called. CmdHaveLost does not print anything, but I do get en output right before it is called. Why could it work on some clients and not on others? I findit especially weird that the host is the one that does not call the function properly.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
OnStart ___ vs OnLobbyStart ___ methods from NetworkManager and NetworkLobbyManager 1 Answer
How to write a multiplayer game that uses a dedicated server? 0 Answers
Questions about Multiplayer and Networking? 1 Answer
UNet child objects: MonoBehavior or NetworkBehavior? 0 Answers