How to stop the RPC flow for a player until his device finish loading something?

Options
XxMBxX
XxMBxX

Hello, I'm trying to let players send their .obj file to the game so they all can change its scale or color it, so I don't want a situation where a player is still downloading the .obj, and if someone colors it and an object reference error will occur... So is there a way to stop the player's RPC flow until he completely downloads the obj? Thanks

Best Answer

  • Tobias
    Tobias admin
    edited November 2022 Answer ✓
    Options

    You should be able to use PhotonNetwork.IsMessageQueueRunning for this. Set it to false when you don't want to dispatch incoming messages and set it to true when loading is done.

    There are several places in the docs and API reference, where IsMessageQueueRunning is mentioned, so you should find the details there.

Answers

  • Tobias
    Tobias admin
    edited November 2022 Answer ✓
    Options

    You should be able to use PhotonNetwork.IsMessageQueueRunning for this. Set it to false when you don't want to dispatch incoming messages and set it to true when loading is done.

    There are several places in the docs and API reference, where IsMessageQueueRunning is mentioned, so you should find the details there.