isMessageQueueRunning problem

Hi, and thanks in advance.

I have this code to load my scenes in mainmenu.
IEnumerator LoadScene(){
	AssetBundle Levels;			  
	string URL = ""+escena["escena"];

	PhotonNetwork.isMessageQueueRunning = false;
	download = WWW.LoadFromCacheOrDownload (URL,1);		
	while (!download.isDone)
		yield return new WaitForSeconds(0.5f);
	if (download.error == null)
		Levels = download.assetBundle;
IEnumerator MoveToGameScene()
	while ( == null)
            yield return 0;

When the scene are cached the game works ok, but when is the first time i have the OnFailedToConnectToPhoton warning and then OnDisconnectedFromPhoton after the loading finish , so the player dont instantiate and I can't come inside. I'm using the last version of photon plugin 1.4 and also the RC5 server.

If I comment the line "PhotonNetwork.isMessageQueueRunning = false;" connects ok, but if there are some other players when i connect in the scene, them instantiates before i can entry, and then i can't see the other players, but them yes to me.



  • Hi again,

    Basically the problem is this, When the message queue is disable and the clients are waiting to loading the scene the connection from server disconnects.

    I suppose that the waiting is a bit longer, so there are something where configure and increment the timeout or something? Thanks
  • Hi,

    I found the problem,
    , should be

    in the PhotonNetwork.cs , public static bool isMessageQueueRunning , line 375

    So the code finally i think should be like this.
                m_isMessageQueueRunning = value;
                if (!value)
                    PhotonHandler.StartThread(); // Background loading thread: keeps connection alive

    Regards ;)
  • Tobias
    Ouch! :o
    Great find. Thanks for pointing us to it. This actually is still in the current PUN v1.4. Wow.
    Will submit a fix to the store soon.
  • gnoblin
    Sorry for offtopic:
    When releasing updates, do you guys speicfy anywhere which files have been changed since the previous version?
    It would be easier to upgrade PUN version this way.

  • Tobias
    No, we don't list which files we changed. I think a diff software would help more than a list in this case. Even more so, if you ever skip one version.
    The current rate of updates and being open source means more work at the moment. I'm not sure how other projects handle this in a better way...
  • dreamora
    diff software is a bit tricky with photon ... between RC3 and RC6 you changed so much it became useless as every single line was 'changed' basically as stuff got resorted in files etc
  • Tobias
    I see. Sorry for that. We try to enforce a certain, readable code style server-side and this leads to refactoring when we notice we're off from that style.
    I will stress this topic for the next updates but can't promise anything yet.
  • dreamora
    Okey :)
    Yeah refactorings are unavoidable as code matures, even my simplest code would suffer from similar problems normally when looking at it over the timespan of man weeks++

    And I will see if I can make WinMerge or something else smarter when it comes to handling of moved blocks and alike, I'm sure there are ways that I just haven't enabled yet.