bear
bear2mo ago

SendRPCMessage in WebGL

I'm main target is WebGL and the docs states "SendRPCMessage does not work". Is this still the case? If so, is there any replacement I can use in the meanwhile?
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @bear. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, according to the NormalVR documentation, SendRPCMessage is still not available in the WebGL version of Normcore. This feature is intentionally disabled in the WebGL alpha. The documentation states: Known Issues (https://normcore.io/documentation/platforms/webgl#known-issues):
SendRPCMessage does not work This feature is intentionally disabled in the WebGL alpha. We plan to deprecate this API in Normcore 3 in order to replace it with a more feature-rich version.
As for a replacement, the documentation suggests an alternative approach using the Normcore datastore to trigger one-shot events on all clients. This is described in the RPC Events recipe (https://normcore.io/documentation/guides/recipes/rpc-events#recipe):
This recipe shows how to use a model to send an RPC-like event message that can be fired by anyone in the room.
The recipe demonstrates how to create a custom RealtimeModel to hold the event data and use it to trigger events across all clients. This approach is more in line with Normcore's synchronization model and avoids some of the pitfalls associated with traditional RPC messages. If you absolutely need the legacy RPC API for your project, the documentation mentions that you can contact NormalVR:
If you need this functionality in your project, let us know and we can provide a version with the legacy RPC API enabled.
However, keep in mind that NormalVR generally discourages the use of RPC messages due to potential synchronization issues, especially for late-joining clients. They recommend using their datastore-based approach for more consistent and reliable synchronization across all clients. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@623811261905502238> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
maxweisel
maxweisel2mo ago
SendRPCMessage works in WebGL now. That docs page is for the 3.0.0 alpha, but in the public version of Normcore, SendRPCMessage works correctly

Did you find this page helpful?