The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Background Music Syncing

2019-10-21 23:20:46

Can anyone help me with audio in a multiplayer app I'm developing in Unity with Photon? I want to have background music which is in sync for all players. But what's happening is that the music starts from the beginning for each player as they enter the game. So for example if the first player to enter is at 30" into the music (having started at 0"), the music will continue playing from 30" for the first player but from 0" for the second player. Instead I want the music to be playing at 30" when the second player enters. I've tried every configuration of the Audio Source and Audio Listener components I can think of but can't get the music synced for all players. Thanks for any assistance you can provide!


2019-11-10 11:16:11

Set a number in a script. Synchronize it with OnSeralizeView, and when a player joins, set the audiosource's seconds to the number in the Start function.

2019-11-10 17:20:08

Thanks! I'll try this out and post the results.

2022-02-10 17:49:31

OjosLindos 2019-11-10T17:20:08+00:00
Thanks! I'll try this out and post the results. Did you get this to work? I am trying to figure it out.

2022-02-10 19:25:26

Sorry, I wasn't able to get the solution to work.

Back to top