Scene Name Of SceneLoadRemoteDone ?

Options
Is there a way to check which scene did the remote load ?
I turned off the AutoSceneLoading , so my server only needs certain SceneLoadRemoteDone callback.
Thanks !

Comments

  • ramonmelo
    Options
    Hello @Arauta ,

    When the Scene loader is disabled, you are also disabling the Scene related callbacks.
    Bolt is not designed to work with multiple scenes, so the clients should be always at the same scene as the game server.

    If you are using a different approach, by disabling the Bolt scene manager, you have a few alternatives:
    1. [Preferable] You can send an Event from the clients to the Server connection signaling its current scene, and the server just listens for those events: https://doc.photonengine.com/en-us/bolt/current/reference/events .
    var sceneUpdate = SceneUpdateEvent.Create(Bolt.GlobalTargets.OnlyServer, Bolt.ReliabilityModes.ReliableOrdered);
    sceneUpdate.currentScene = SceneManager.GetActiveScene().buildIndex;
    sceneUpdate.Send();
    

    2. Or you can maintain a global entity to sync this information from each client. You can do this by just creating an entity on the client, and on the server, you read it's properties.