Closed aldo-leka closed 5 years ago
There are two ways of doing this:
The VoiceBroadcastTrigger
ultimately just opens and closes Channels
which control who you are transmitting voice to. So you could write your own trigger which monitors your button and opens/closes the channels as necessary. There's a tutorial on channels here.
Alternatively if you go to Assets/Plugins/Dissonance/VoiceBroadcastTrigger.cs
around line 369 you will find private bool IsUserActivated()
- this method returns a bool to indicate if the user wants to transmit speech (Push-To-Talk is pressed, Voice-Detection is active etc). You can modify this, either by replacing the code inside the case CommActivationMode.PushToTalk:
case, or by adding a new branch for something like CommActivationMode.ToggleUiToTalk
. I would recommend this approach.
Hopefully that resolve your issue, please close this issue if so :)
I need to add a button on mobile for Push to Talk but it is bound to Input.axis which does not work with Unity's UI system. I need a way to enable and disable the microphone depending on a UI toggle. How can I do that?