Mirror multiplayer Command problem
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
How can I send update to all clients from one client in Multiplayer game in Unity3d? 0 Answers
How to decide an asynchronous multiplayer solution for a turn based mobile chess game? 0 Answers
TrailRender not showing in all clients using Mirror networking 1 Answer
Whats the best beginners tutorial for Photon Networking with Unity 2 Answers
RPC sending Failed 0 Answers