How to do a private voice chat with Photon Voice and PUN2 ?


I'm developping a multiplayer game on Unity3D with Photon PUN2 (Free) and Photon Voice, and i'm trying to do a private voice chat between players when they entered a certain area (collider).

For now, my player prefab got those components : photon voice view, speaker, recorder and the photon view. A game object in my scene also got the photon voice network component.

I tried to modify the "interest group" method in Recorder to do so, but i don't really understand how it works. Do i need to use it ?

Please can someone help me ?


  • JohnTube
    JohnTube ✭✭✭✭✭

    Hi @Dubs,

    Thank you for choosing Photon!

    Please check DemoProximityVoiceChat in Photon Voice 2, it does exactly this: you can talk to and listen to those who are 'in the same collider as you'. Check script ProximityVoiceTrigger.cs.

  • Hello @JohnTube ,

    Thank you very much for your reply, just one more question.

    Do you think it's possible to make private rooms using ProximityVoiceChat prefab ? For example, all players can talk to each other in the scene (if they are close enough to hear each other), but when they entered the green zone (a sphere with collider), it became a private conversation and people outside the zone can't hear the conversation.