I cannot find any good resources on how to use VivoxParticipant. From what I can find, it is an object, but I cannot seem to create it or find any way to get the participant from Vivox.Instance. My use case is very simple and does not need to actually be able to access other participants, I just want to be able to get the AudioEnergy value to make your character respond to you talking. The code that I have used up to this point has not used VivoxParticipants at all (I will include screenshots of the main sections of my channel code).
To clarify: I just need to have a participant for the local player, and it does not even have to be shared across each player.
#How do you use VivoxParticipant?
1 messages · Page 1 of 1 (latest)
The docs are bit of a mess. Here is the Participant Tap scripts
Thank you, but I am still a bit confused as to what exactly a VivoxParticipant is. I cannot tell how to make or access one. My code says that I need an object reference for it, but I do not know what a participant object is. I can make a reference to a VivoxParticipant with "public VivoxParticipant vivoxParticipant", but I cannot find a component or object in the Unity editor to set it to. In my script it is referenced as a type (like gameObject or float), but my code says that it does not contain a constructer that takes 0 arguements and does not elaborate on what arguments it does take.
https://docs.unity3d.com/Packages/com.unity.services.vivox@16.9/api/Unity.Services.Vivox.VivoxParticipant.html
If I could find out what to set the VivoxParticipant to, then it seems like my code to get the mic volume would work, as I get no error lines on it when I have a variable for VivoxParticipant.
https://docs.unity.com/en-us/vivox-unity/developer-guide/channels/participant-events This is the only resource that I can find that sets participants, but it does it based off of OnParticipantAdded and OnParticipantRemoved, and I cannot find a way to simply just set a Participant as the local VivoxParticipant. I tried to implement the way that it does it in this Doc, but it requires "RosterItem"s and I do not know what they are, and when I just try to use the example code, it tells me that they do not exist.
Basically I am wondering if I can get the participant with OnParticipantAdded as the player joins?
You can also use the participant tap component https://docs.unity.com/en-us/vivox-unity/developer-guide/audio-taps/tap-component-parameters or you can subscribe to VivoxService.Instance.ParticipantAddedToChannel to get each participant when they join the channel
That worked, thank you.