Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Does PUN use quantum theory in its core?

$
0
0
Hey. I might be wrong but it seems that PUN doesn't work in a right way unless I measure its state by switching Pun Logging to Informational. Seems like PUN has its own intelligence that tries to trick me.

My problem is, that when Pun logging set to Errors Only, and I leave the current scene by loading another scene, it automatically loads the previous scene.

For example:
1. I'm in scene number 2.
2. I load scene number 1.
3. It automatically loads scene number 2.

And in the log I can see that it had loaded the scene number 1, and after this it loaded the scene number 2.

But I have Debug.Log() in methods that are used in the scene 1, so I would see if some of those methods had been called.

Anyways, when I set Pun Logging to Informational, everything works fine, and nothing loads scene number 2 automatically.


Here is how I load the scene number 1.

public void PlayAgain()
{
PhotonNetwork.LeaveRoom();
SceneManager.LoadScene(0);
}


And here is the main script in the scene number 1.

pastebin.com/weucf6UE

The scene number 2 should be loaded in private IEnumerator StartCountDown() and before it happens i should see a message in the log, but this message doesn't appear, so i'm not sure what and why loads the scene number 2.

Viewing all articles
Browse latest Browse all 15755

Trending Articles