Question.

Question. If I want to make one player mute to all players can I disable the Realtime Avatar Voice (Script) Component ? I know there is a mute setting, but it looks like that fills the data with 0s, but still sends the silence. Also, what if I disable the Realtime View (Script) Component. I assume that stops all network traffic on the gameObject, like voice and transform. Can I safely re-enable these later to make them work again ? Is this the best way to do this ?
3 Replies
kapa.ai
kapa.ai3w ago
Hi @ReadyPlayerOne. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To answer your question about muting players and disabling components in NormalVR, let's break it down into parts: 1. Muting a player for all players: According to the Voice Chat documentation (https://normcore.io/documentation/realtime/xr/voicechat), the RealtimeAvatarVoice component has a mute property. When this property is set for a local player, it will stop sending audio, effectively muting the player for everyone in the room. So, you don't need to disable the entire component to achieve this.
RealtimeAvatarVoice includes a `mute` property. If `RealtimeAvatarVoice` represents a local player, this property will stop sending audio, effectively muting this player for everyone in the room.
RealtimeAvatarVoice includes a `mute` property. If `RealtimeAvatarVoice` represents a local player, this property will stop sending audio, effectively muting this player for everyone in the room.
2. Disabling RealtimeView: Disabling the RealtimeView component is not recommended. According to the Common Questions documentation (https://normcore.io/documentation/realtime/common-questions), disabling RealtimeView can prevent it from registering with Realtime:
No. Scene RealtimeViews register with Realtime in `Start()`. If they are disabled, they will never register: Realtime will neither initialize them nor connect them to the datastore.
No. Scene RealtimeViews register with Realtime in `Start()`. If they are disabled, they will never register: Realtime will neither initialize them nor connect them to the datastore.
3. Best approach: The documentation suggests using a custom RealtimeComponent to enable/disable child game objects, scripts, or renderers directly, rather than disabling RealtimeView:
Instead, you can use a custom RealtimeComponent to enable/disable child game objects, scripts, or renderers directly.
Instead, you can use a custom RealtimeComponent to enable/disable child game objects, scripts, or renderers directly.
4. Re-enabling components: The documentation doesn't specifically address re-enabling these components after disabling them. However, given the warnings about disabling RealtimeView, it's best to avoid this approach. In conclusion, the best way to mute a player for all other players is to use the mute property of RealtimeAvatarVoice. This method is designed for this purpose and should work as expected. Disabling the RealtimeView component is not recommended as it may cause issues with synchronization and network traffic. If you need more granular control over network traffic or component behavior, consider creating a custom RealtimeComponent to manage these aspects of your game objects. This approach would allow you to safely enable and disable specific functionalities without risking the core synchronization provided by RealtimeView. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@814977663450087444> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
maxweisel
maxweisel3w ago
@ReadyPlayerOne the native plugin is smart enough to detect the silence when it goes to compress the audio data. It then only sends an occasional timing packet. This is the optimal setup. If you stop sending audio altogether, you're going to find when you turn it back on that all receiving clients are extremely delayed because they can't tell the difference between mute and a laggy connection on the sender side if those timing packets don't go out

Did you find this page helpful?