im developing a realistic fps with multiplayer using netcode for gameobjects. Im stuck at trying to get the muzzle flash effect to show for the other player,
im experienced with unity but not with netcode, so sorry if this is a noob question
my particle system is attached to the gun and played with this function:
public void shoot_muzzleflash()
{
muzzleFlash.Play();
}
and im activating this function in an animation with an event. I tried this:
[ServerRpc]
public void CmdStartParticles()
{
RpcStart_shoot_muzzleflash();
shoot_muzzleflash();
}
[ClientRpc]
public void RpcStart_shoot_muzzleflash()
{
shoot_muzzleflash();
}
public void shoot_muzzleflash()
{
muzzleFlash.Play();
}
but then i cant choose the CmdStartParticles() as an event in the animation