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:
日本語訳です:
件名:SendCustomNetworkEventがPlayerManagerという名前のオブジェクトで機能しない
GameObjectに「PlayerManager」という名前を付けると、SendCustomNetworkEventの実行がブロックされます。この動作はビルド 944 ないしは 946 から新たに予告なしに始まりました。
---
このワールドでは2つの GameObject に同一の Udon プログラムを使用しています。
オブジェクトを PlayerManager と名付けた失敗するケースでは次のようなログが表示されます(「naqtn」は私のユーザー名です):
[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
---
一方、
Foo
と名づけた成功するケースは次のようになります。[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
---
この動作は、“本物の” PlayerManager がどこかに(おそらく隠されたプレーヤー・オブジェクトの中に)存在し、システムが悪意のある着信メッセージをブロックしたいためなのだろうと想像します。Network id をうまく調節すると到達できるのかもしれません。しかし、名前によるブロックは信頼性に欠け、この遮断を行うための良い方法ではないと思います。 VRC_EventDispatcherRFCは、本物の PlayerManager オブジェクトへの参照を内部で取得できるでしょうから。
これがバグかなのか意図された機能なのかは私には判断が付きません。もしこれが機能である場合は、ドキュメントに記載し Udon クリエイターに周知するよう、お願いします。