Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question PUN 2 Loading Scene Async progress issue??

Discussion in 'Multiplayer' started by dick, May 30, 2022.

  1. dick


    Sep 6, 2014

    When loading the game-scene (from the menu) for the first time using PUN, then checking the scene-loading progress using PhotonNetwork.LevelLoadingProgress > 0f, it works as it should.

    But when I return from the game-scene to the menu-scene, the value of PhotonNetwork.LevelLoadingProgress is = 1. (fully loaded)

    How would I be able to check for the scene loading progress again if trying to load the game-scene again?

    Thank you!
  2. tobiass


    Apr 7, 2009
    Internally, PUN stores a _AsyncLevelLoadingOperation, when it synchronizes the scene used in a room.
    If you are not in a room, this is probably null and won't show correct progress.
    When you join another room, PUN checks if some room name or index is set and will load that scene and again show the progress.

    So, if you load scenes while not in a room, use the Unity APIs to show progress.