Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

[bug] Pun2 tracking for positional audio non-functioning #175

Closed blakesteel closed 4 years ago

blakesteel commented 4 years ago

Context

The positional audio is not working with Dissonance + PUN2. The voice works correctly, however the buffered requests aren't showing up when adding tracking when new clients connect.

Expected Behavior

Positional audio should work, e.g. rolloff and spread should function.

Actual Behavior

The tracking is not set up so the audio remains 2D global. Also, the photon initialize magic call never occurs I had to move this into the awake.

Workaround

I managed to rewrite the tracking code to work for one client by forcing the local names to be set and sent to the master. But, it only works for the master, there isn't a way to replicate it to all the other incoming connections. However, I was able to verify at least the master could hear the positional audio. I tried a lot of different ways to replicate it via tables, Entered messages, or even trying to use the published userids instead of the local names but nothing worked.

Fix

None that I know of at the moment.

Your Environment

martindevans commented 4 years ago

I've just tested this and I can't reproduce it locally. I started a session using the PUN2 demo scene with 2 players, when I added a third player the SetPlayerName method was called three times (once locally, twice from PUN buffered RPC). I checked in the Unity editor scene view and the playback gameobjects (children of the DissonanceComms gameObject) are moving with the player gameObjects as expected.

the photon initialize magic call never occurs I had to move this into the awake.

Do you mean this method: void IPunInstantiateMagicCallback.OnPhotonInstantiate(PhotonMessageInfo info) is never invoked? That should be invoked automatically by PUN2, if that's not getting called there's some deeper setup issue with PUN2 we'll need to dig into!

martindevans commented 4 years ago

Since I can't reproduce this issue I'll close it for now. If you can give me more details about what the problem is and how I can reproduce it please do and I'll reopen the issue right away :)