SendCustomNetworkEvent does not work on an object named PlayerManager
naqtn
If you name your GameObject
PlayerManager
, then execution of SendCustomNetworkEvent is blocked. This behavior newly started from build 944 or 946 without any notice.I made a world for reproduction: https://vrchat.com/home/world/wrld_f17d2b37-2f60-47d2-b280-e4489ba29368
---
I use identical Udon program for two GameObjects. You'll see logs for the failure case (named
PlayerManager
) like this ("naqtn" is my user name):[Network Processing] RPC called PlayerManager:UdonSyncRunProgramAsRPC:All and 10 bytes
[VRC_EventDispatcherRFC] SendRPC/AlwaysUnbuffered on PlayerManager blocked for naqtn (local master owner)
---
On the other hand, the log success case (named
Foo
) is like this:[Network Processing] RPC called Foo:UdonSyncRunProgramAsRPC:All and 10 bytes
[VRC_EventDispatcherRFC] Will execute SendRPC/AlwaysUnbuffered on Foo (UnityEngine.GameObject) for naqtn: S: "UdonSyncRunProgramAsRPC" I: 0 F: 0 B: Unused (local master owner)
[Network Processing] RPC invoked UdonSyncRunProgramAsRPC on Foo for naqtn
[UdonSync] Foo executing echo at the behest of naqtn
---
I guess "real" PlayerManager exists somewhere (perhaps in hidden player object) and the system wants to block malicious incoming messages. It might reach with adjusted network id. But I think blocking by the name is not reliable and is not good way to do that. Because VRC_EventDispatcherRFC must be able to get the object reference of real PlayerManager internally.
I'm not sure this is a bug or intended feature. If this is a feature, please describe in the document and announce to Udon creators.
Log In
Jar
A note for anyone having this problem still-
Apparently this also blocks SendCustomNetworkEvent on children of the PlayerManager too.
I can just name my object "Player Manager" instead though it would have been nice to know this. Glad I found this bug report
naqtn
For Japanese readers:
Here's the Japanese translation:
Subject: sendCustomNetworkEvent doesn't work with an object named PlayerManager
If you name the GameObject “PlayerManager”, execution of SendCustomNetworkEvent will be blocked. This behavior started unannounced once again with build 944 or 946.
Reenactment World: https://vrchat.com/home/world/wrld_f17d2b37-2f60-47d2-b280-e4489ba29368
---
The world uses the same Udon program for both GameObjects.
In the unsuccessful case where the object is named PlayerManager, the following log is displayed (“naqtn” is my username):
[Network Processing] RPC called Foo: udonSyncRunProgramasRPC: All and 10 bytes
[vrc_eventdispatcherrFC] Will execute sendrpc/alwaysUnbuffered on Foo (UnityEngine.GameObject) for naqtn:S: “udonSyncRunProgramasRPC” I: 0 F: 0 B: Unused (local master owner)
[Network Processing] RPC explains udonSyncRunProgramasRPC on Foo for naqtn
[UdonSync] Foo surprised echo at the behest of naqtn
---
Meanwhile, a successful case named
Foo
looks like this:[Network Processing] RPC called Foo: udonSyncRunProgramasRPC: All and 10 bytes
[vrc_eventdispatcherrFC] Will execute sendrpc/alwaysUnbuffered on Foo (UnityEngine.GameObject) for naqtn:S: “udonSyncRunProgramasRPC” I: 0 F: 0 B: Unused (local master owner)
[Network Processing] RPC explains udonSyncRunProgramasRPC on Foo for naqtn
[UdonSync] Foo surprised echo at the behest of naqtn
---
I imagine this behavior is because the “real” PlayerManager exists somewhere (probably inside a hidden player object) and the system wants to block malicious incoming messages. If you adjust the network id properly, you may be able to reach it. However, blocking by name is unreliable, and I don't think it's a good way to do this blocking. VRC_EventDispatcherrFC will be able to obtain a reference to the real PlayerManager object internally.
I can't decide if this is a bug or an intended feature. If this is a feature, please include it in the documentation and let Udon creators know.