Placeholder-Software / Dissonance

Unity Voice Chat Asset
70 stars 5 forks source link

A room is joined even when none are defined in the editor. #128

Closed KoushiroMitani closed 5 years ago

KoushiroMitani commented 5 years ago

Context

When all Rooms are cleared out of the editor, VoiceReceiptTrigger will still join with the same channel you last launched with.

Expected Behavior

Expected to not join any rooms when none are defined in the editor.

Actual Behavior

Even though no rooms are configured, it will join one. When producing this small project I noticed that it was joining a room of empty string ''. Only after I launched with the room defaulted to 'Global' once did it persist after removing the room from the editor.

Workaround

Manually setting the active room name on the VoiceBroadcastTrigger/VoiceReceiptTrigger will override the existing one:

                VoiceBroadcastTrigger broadcast = comms.GetComponent<VoiceBroadcastTrigger>();
                VoiceReceiptTrigger receipt = comms.GetComponent<VoiceReceiptTrigger>();
                broadcast.RoomName = receipt.RoomName = roomName;

Fix

Steps to Reproduce

  1. Create DissonanceComms/Triggers on an object.
  2. Play scene ("Global" room is pre-defined).
  3. Stop scene.
  4. Remove all rooms from DissonanceComms editor.
  5. Play scene, Global is still joined.

Your Environment

Include as many relevant details about the environment you experienced the bug in

martindevans commented 5 years ago

I think this is a case of the UI being very misleading - when you delete the room from the "Configure Rooms" panel that's just depopulating the UI and it doesn't have any effect on configured triggers at all. I'm going to modify the UI to correctly show which room a trigger is targeting (even if that room has been deleted) and I will also add a note next to the "delete room" button that it does not reconfigure existing triggers.

I would suggest disabling the trigger component in the scene, and then enabling it after you have set the RoomName property to whatever room you really want it to be.

martindevans commented 5 years ago

Dissonance 6.3.0 just went live on the asset store, that version includes improvements to the UI to ensure that this kind of confusion shouldn't happen again. I'll close this issue now, don't hesitate to re-open it if the problem persists :)