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
Documentation

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.

Read More on
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.

Automatic Sync Scene strange behaviour

luvjungle
2018-09-20 22:14:43

I have loading scene with Automatic Sync Scene turned to true.
At the game scene I turn it to false, so my players can watch theirs game over screens independently and then press button to go back to lading scene, where automatic scene will be turned to true once again.
But I can't get it to work.
At my game over screen everything works good only if master client goes to Load scene first. He gets on Load scene, then not master client clicks his button and goes to Load scene too.
But If not master client clicks button to open Load scene first, he just re-loads active scene.
More to that, if then master client clicks button to open Load scene, not master client loads that scene too.
So it is automatic syncing. But why it is not auto syncing in the first case?
I turn off automatic syncing on both clients at the start of my game scene. Maybe I just can't do it at runtime?
Please help me fix this issue.

Comments

[Deleted User]
2018-09-25 08:59:21

Hi @luvjungle,

PhotonNetwork.automaticallySyncScene is set for each client individually. Means that a client only loads a synchronized scene, if he has enabled this feature and PhotonNetwork.LoadLevel has been called by the MasterClient. Only the MasterClient can synchronize levels. Each other client, who calls PhotonNetwork.LoadLevel, will load the new level, but won't add the level's name or build index to the Custom Room Properties. The result is, that the loaded level is not synchronized across the other clients.

Back to top