Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

Join to Global room by default #291

Closed artemiys930519 closed 1 month ago

artemiys930519 commented 1 month ago

When starting the project, dissonance enters the Global room by default (although I did not enter it and the list of rooms from the config file is empty) And when switching to other rooms, it still remains in the Global room and cannot be exited. Accordingly, the user hears in two rooms: Global and the desired one. Question: How can I remove the ability to enter the Global room by default?

On Scene exist:

DissonanceComms, MirrorIgnoranceCommsNetwork, Voice Broadcast Trigger - Clear Room list Voice ReceiptTrigger Unity - 2021.3.35f Mirror - version 89.0.0 (LatensySimulation->KCP Transport) Dissonance - version 9.0.4 Client- Android and PC Server - linux(but error exist in editor too) image

martindevans commented 1 month ago

I think this might be the inspector being a bit misleading.

If you remove the room from the rooms list that does not disable that room from being used! The rooms list has no effect at runtime at all is purely for your convenience (filling in the rooms dropdown list)!

That VoiceBroadcastTrigger is still invisibly configured to send to the Global room. You should disable the trigger if you don't want it active.

artemiys930519 commented 1 month ago

It's like that. Thanks for the info. But I can’t leave the Global Room, all subsequent rooms I enter are added on top of the Global. And accordingly, I do not have a RoomMembership object to pour from this channel.

It turns out that in order to exit the Global Room I need to turn off the VoiceBroadcastTrigger and VoiceReceiptTrigger scripts for the Global Room? Is there another way? For example, somehow get RoomMembership? Since I store all the RoomMembership structures of the rooms that I entered, it is more convenient to manipulate the rooms, for example, if you need to create a private room.

martindevans commented 1 month ago

The entire point of the VoiceBroadcastTrigger/VoiceReceiptTrigger objects is to manage room memberships/channels for you. If you want to manage it all yourself from code then you should simply delete the trigger objects.

VoiceBroadcastTrigger (controlling sending) is a wrapper over the Channels API (docs).

VoiceReceiptTrigger (controlling receiving) is a wrapper over the Rooms API (docs).

artemiys930519 commented 1 month ago

Okay, I understand, thanks for the information