Photon voice not trasmitting both players
Hello everybody,i am having a bug with photon voice2,i set up it but when i eneter a room with 2 players inside just the master-client can talk,while the other no.
How can i solve the problem?
I don't know if this can help,the "XROrigin" is the master-client who is speaking and can be listened over the network,while the "XrOriginClient" is the other player who can listen the master-client but can not speak.
In the speaker of the master-clienton the audio source there is an AudioClip called "UnityAudioOut",while in the voice AudioClip of the other player there is nothing (from the image you can not see but i cheacked).
Greetings. I responded in my discord as well, but Wanted to answer here too to help anyone else who comes across this.
- Avoid having your XR Origin as part of your player. If the other players don't need to see it, there is no reason to have it be the player. What I do, is the XR Origin is already in the scene. Then I have a seperate prefab act as my 'Player Avatar'. It gets instantiated when I connect to the room, and if its mine, I make it a child of my Main Camera (which is a child of the XR Origin. My 'Player Avatar' also has the Network Transform on it.
- My scene has a 'VoiceManager' game object on it, with a 'Photon Voice Network' (which i think is called something else now) component, and a 'Recorder' component (make sure 'Transmit Enabled' is on for your 'Recorder). You can see in my youtube video here at 2:16 this setup.
- Your 'Player Avatar' will need a 'Photon Voice View' component on it. You can see in my youtube video here at 3:46 my setup.
- Your 'Photon Voice View', make sure the 'Use Primary Recorder' box is checked. You'll need to create a Gameobject as a child of your 'Player Avatar'. Add the 'Speaker component to this gameobject. Then drop this gameobject into the 'Speaker in Use' property of the 'Photon Voice View'.
This is a little paint of the problem i have,imagine that the rows are the voices of the players0
I think that the problem is that when i am the master-client the voice connector doesn't manage to create a speaker to link the audio,also if i drag a speaker prefab in the voice connector before running the game.
How can i solve the problem?0