Photon Voice

Photon Classic

For voice chat support, make sure that you have included the Photon Voice package.

In the Photon Server Settings (found in Photon Unity Networking/Resources), set the Voice AppId to the same App Id you use for setting up Photon.

Make sure that the humanoid has an audio listener on the head target. The humanoid prefab already has this included

Select the Photon PUN prefab which is spawned across the network. If you use the Networking Starter this usually is Humanoid PUN which is found in Assets/Humanoid/Prefabs/Networking/Resources/

Add the Photon Voice Recorder script to the Player Prefab. Doing this will also add an Audio Source and Photon Voice Speaker automatically.

That’s it. Voice chat should work now.

Photon 2

For photon 2, you need to include the Photon Voice 2 package in your project.

In the Photon Server Settings (see Window Menu->Photon Unity Networking->Highlight Server Settings, set the Settings->App Id Voice to the same App Id you use for setting up Photon 2. This App Id is also found in the App Id Realtime field.

Select the Photon PUN prefab which is spawned across the network. If you use the Networking Starter this usually is the HumanoidPun prefab which is found in Assets/Humanoid/Prefabs/Networking/Resources/

Add the following components to the HumanoidPun prefab:

  • Add a Photon Voice View component
  • Add a Recorder component, make sure you have Auto Start and Transmit Enabled switched on
  • Set Photon Voice View->Recorder in Use to this Recorder

The result should look like this:

Now if you start you project, Photon Voice should work.