Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

Unable to select a chatroom in VoiceBroadcastTrigger oor VoiceReceiptTrigger #145

Closed Piflik closed 5 years ago

Piflik commented 5 years ago

Context

Chat Room dropdown is not drawn if _roomName string is empty, both in VoiceBroadcastTrigger and VoiceReceiptTrigger. Obviously this is the default state when one of these scripts is added to a gameObject, making it impossible to use the plugin without editing the scripts.

Expected Behavior

Display both the room dropdown and the error message stating that no room has been selected

Actual Behavior

Only the error message is displayed

Workaround

Edit the scripts to have a valid _roomName string and Reset the monobehaviours on the gameobject, or add new ones.

Fix

Edit the Custom inspectors so both UI elements are displayed. Add EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal();

into the if (string.IsNullOrEmpty(transmitter.RoomName))... part in order to display the dropdown on a new line.

Steps to Reproduce

  1. Add a VoiceBroadcastTrigger or VoiceReceiptTrigger to a gameobject
martindevans commented 5 years ago

Thanks for reporting this. I don't quite see the same problem, as you can see in this gif it is displaying the dropdown UI but it's horribly aligned and quite possibly off the side of your screen:

2019-03-14_16-36-31

This is obviously a horrible UI, I'll fix it right away!

Piflik commented 5 years ago

Yeah, I found it after posting the issue. I used EndHorizontal and BeginHorizontal to place it below the "No Room" label. Alternative, this label could be removed entirely since it doesn't add any information that the Error Message doesn't already display more prominently.

martindevans commented 5 years ago

Yeah I'm not quite sure why that label exists. The git blame log says it was added to handle an edge case around rooms being deleted (leaving triggers that reference that room in a weird state), but it's obviously not working as expected!

martindevans commented 5 years ago

This was released in Dissonance 6.4.0 (2 weeks ago, but I forgot to update this issue)