Works in unity editor but not in build

Hi!
I'm using Photon Voice 2 together with an already existing PUN 2 project. I get voice when running it in the editor, but when I build the project I get the following error in the development build:

[PhotonVoiceNetwork singleton PhotonVoiceNetwork] Settings are null
[PhotonVoiceNetwork singleton PhotonVoiceNetwork] Connecting to server failed

I have a voice network, recorder in the scene and a photon voice view + speaker on a player prefab.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @elwe,

    Thank you for choosing Photon!

    What Photon Voice 2 version are you using?
    What Unity version are you using?
    What is the target platform of your development build?

    Make sure you have "PHOTON_UNITY_NETWORKING" in the Unity Editor Player Settings' "Scripting Define Symbols".
    Also, make sure "PhotonServerSettings" ScriptableObject make it to the build.

    Does PUN2 manage to connect?
    What is the value of Pun.PhotonNetwork.PhotonServerSettings.AppSettings?
  • Thank you for your fast reply.
    Tried putting in the PHOTON_UNITY_NETWORKING setting, but made no difference.

    Unity version 2018.2.10f1
    v2.0 (October 10th, 2018)
    PUN2: v2.2.1 (3cd5540) according to the changelog.
    Target platform is Windows (x86_64)

    Not sure how to take "PhotonServerSettings" ScriptableObject into the build.

    It looks like PUN2 connects but not voice.

    Appsettings are a PhotonRealtime ID and use nameserver = true and I have also tested a self-hosted server for this, which makes no difference.
    The voice ID is put under VoiceNetwork + nameserver =true.


  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @elwe,

    If you import Photon Voice 2 in a fresh clean new empty project and run the demo scenes do you have the same issue?
    What is your setup?
    Do you enable "Use PUN Settings" from VoiceConnection or use PhotonVoiceNetwork?
    If you test on self-hosted Photon Server you need to disable "Use Name Server".