PhotonNetwork.isMessageQueueRunning and SetRoomCustomProperties

The whole answer can be found below.

Please note: 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! And we offer you support through 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.

PhotonNetwork.isMessageQueueRunning and SetRoomCustomProperties

reiben
2019-08-11 06:14:52

Hi,

I am using in my project PhotonNetwork.isMessageQueueRunning = false in order not to receive RPC before my client I ready to game. But if other client is setting values to CustomProperties of the room, the value is not sync between players.

if I have PhotonNetwork.isMessageQueueRunning = true, everything seems to works just fine. Is it possible, or I am doing something wrong?

Comments

JohnTube
2019-08-13 09:25:09

Hi @reiben,

Thank you for choosing Photon!

That is expected.
All commands/messages received from the server (including PropertiesChanged events) will not be dispatched and processed if the message queue is paused (not running).

maxclark
2020-09-28 21:10:35

Hi JohnTube, I realize now that setting PhotonNetwork.isMessageQueueRunning to false doesn't block outward RPCs. Is there a way I can toggle off outward RPCs?

For me, while my master client is loading, they network instantiate a bunch of stuff and some of those send RPCs, which is important for when those prefabs are instantiated mid-level, but honestly could just be local functions when they're instantiated during loading the level.

I want my network objects to still be network instantiated so the joining player gets those, but I want to ignore any RPC calls I make myself until after the master client has finished the entire scene load/setup. I realize I can make something like a global variable like "stillSettingUpScene" and check that before sending any RPCs, but I'd like to avoid that. Do you have any suggestions?

Back to top