LoadBalancingTransport.SendFrame is not being called in a build

Hi,

I put a Debug.Log inside of LoadBalancingTransport.SendFrame. It outputs fine in the Unity Editor, but it never outputs in a built version of my project. I've confirmed that I can actually transmit audio to another client though, in both the Unity Editor and a build.

What might be causing this? I need to be able to call a function whenever I'm transmitting audio.

Thanks.

Comments

  • Hi @Deibu,

    Thank you for choosing Photon!

    Probably because it's on a different thread and not the main Unity thread.
  • Hi @JohnTube,

    That makes sense now. I'm trying to record all Photon data and play it back (replay system). And when I do it in the Editor, everything works fine. But in a build, when I record and playback the data, I'm only able to hear other clients. I've been printing out that I am in fact recording some voice data from my local client, and it is trying to process something when playing back, but it never seems to get to my local player's speaker.

    The way I'm recording is, whenever I raise an event, I do a deep clone of it. And then on playback, I just reconstruct raise event parameters and send them to LoadBalancingTransport.OpRaiseEvent. I do something very similar for received events, as well as non-voice events.

    It's baffling me because it works 100% of the time in the Editor, for both voice and non-voice events that are raised and received. It only breaks specifically for raised voice events. Do you have any ideas what could be going wrong?

    Thanks.
  • Another thing to note, is that if I make a recording in the Editor, it plays back successfully in a build. It does not, however, play back successfully when doing it the opposite way.
  • Tracked it down to the speaker not spawning properly when replaying. I believe I've fixed it by having my recorder subscribe to events prior to OnJoinedRoom is called, which should ensure that I receive the instantiation event for the speaker prefab.
Sign In or Register to comment.