idk where to post this, i could not find a mirror unity networking forum. i need help in using rpcs. i switched from photon and dont know how to use the rpcs (and cmds) in mirror. plus, i also could not find any instructions or tutorials except a very hard to understand gitbook page.
in my project it is about damaging a player (for a shooter game)
here is how i would do it in pun:
// called at damager
void DealDamage(PhotonView target, int damage) {
target.RPC(“RecieveDamage”, RpcTarget.ALL, damage);
}
[PunRPC] //called at damaged
public void RecieveDamage(int damage) {
healthPoints -= damage;
}
of course i would do hit detection, raycasting before calling DealDamage and adding UpdateUI and if (hp<0) Die(); but this is the core
thx for answers