How to receive notification that Scene Sync was used?

If I do this code on clients:

PhotonNetwork.AutosyncScene = true;

Then they will change scenes when the master clients tells them to. How do I know when they have changed scenes? Is there a Photon notification I can subscribe to that tells me "hey, you have changed scenes because the master client told you to".

Best Answer

  • MrVentures
    Answer ✓

    Yes there is a way, it's a photon room property, see below.

      /// <summary>For automatic scene syncing, the loaded scene is put into a room property. This is the name of said prop.</summary>

        internal const string CurrentSceneProperty = "curScn";

Answers

  • MrVentures
    Answer ✓

    Yes there is a way, it's a photon room property, see below.

      /// <summary>For automatic scene syncing, the loaded scene is put into a room property. This is the name of said prop.</summary>

        internal const string CurrentSceneProperty = "curScn";