com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

[Rpc(SendTo.NotMe)] sends messages for everyone instead of everyone-1

Open ZanderCode opened this issue 1 year ago • 2 comments

Description

I have a projectile function that triggers a knockback effect for local clients enemy. This function also propagates this action to all other clients via [Rpc(SendTo.NotMe)] rpc, so that the knockback can also happen on observing clients. All works well when the server performs this action - the knockback is sent to everyone. Everything is good. However, when the client tries this, the server receives the message twice.

I found this https://forum.unity.com/threads/rpc-method-with-target-notme-or-notowner-called-twice-by-host-server.1543835/ which attempts to solve the problem, but seems like a workaround instead of intended behavior.

ZanderCode avatar Mar 24 '24 19:03 ZanderCode

Hi @ZanderCode We are pleased to inform you that this issue has already been fixed by our development team and it will be included in the upcoming release of NGO 1.9.0.

fluong6 avatar Mar 25 '24 14:03 fluong6

@ZanderCode NGO v1.9.0 is currently in our release process. If you wanted to verify this is fixed or grab the version for this fix before the package is added to the package manager registry, you can use the release\1.9.0 branch.

NoelStephensUnity avatar Apr 04 '24 23:04 NoelStephensUnity