Search Unity

Resolved Host keeps getting [Scene '' couldn't be loaded because it has not been added to the build settings]

Discussion in 'Netcode for GameObjects' started by mpilon_bhvr, Feb 2, 2024.

  1. mpilon_bhvr

    mpilon_bhvr

    Joined:
    Sep 26, 2023
    Posts:
    4
    Whenever a client tries to connect to the host the exception keeps poping up on the host and prevents syncing.

    The scene is on the build list and is loaded from the unity scene manager.

    i'm using NGO version 1.8, parrel sync, default unity transport. The issue is still present in 1.7.1.
     
  2. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    259
    There is most likely an issue with the parrel Sync clone cache.
    You will want to clear those or if you want to verify this is the issue create a new clone and test with that to see if the issue goes away.
     
  3. mpilon_bhvr

    mpilon_bhvr

    Joined:
    Sep 26, 2023
    Posts:
    4
    deleted the old and created a new clone, same issue.

    can't seem to figure out clear the cache to give it a full clean.
     
  4. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    259
    There are two things you can do to verify if it is parrel sync or not:
    • Option 1:
      • Make a stand alone build and just test with two (or more) local stand alone build instances running.
    • Option 2:
      • Copy the following directories into a new directory (outside of your project's current directory):
        • Assets
        • Packages
        • Once done, add that to your Unity Hub and open it as a new project
    If it is specific to parrel sync, then either of the two should work and not throw that exception.
     
  5. mpilon_bhvr

    mpilon_bhvr

    Joined:
    Sep 26, 2023
    Posts:
    4
    can't seem to get the error to go away, i can't find out how to clear the cache for the clones
     
  6. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    259
    Are you creating any scenes during runtime?
    If not, could you post the full exception with the stack trace?
     
  7. mpilon_bhvr

    mpilon_bhvr

    Joined:
    Sep 26, 2023
    Posts:
    4
    i figured out what my issue is.

    It turns out that when i'm loading the scene, the initialization flow was taking too long that the client would disconnect from the host mid process. reconnecting it post load would expose that error; but further investigation found that our scene management was the problem. after reviewing our flow, the error is no longer appearing.
     
    NoelStephens_Unity likes this.
  8. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    259
    Ahh... ok.. glad you found the issue!