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.
  2. Dismiss Notice

Resolved [help] entity is not show at runtime?

Discussion in 'Entity Component System' started by er3dfx, Aug 2, 2023.

  1. er3dfx

    er3dfx

    Joined:
    Nov 22, 2022
    Posts:
    3
    I'm using Addressables, and I want to transition from my lobby scene to a battle scene that contains sub-scenes. I'm using the Addressables.LoadSceneAsync interface to load the scene, but the sub-scenes are not loading. I've created an EntitySceneReference to store the sub-scenes, but I'm getting an error saying "scenefileheader not found." Can you please guide me on how to correctly load a scene with sub-scenes using Addressables?
     
  2. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    288
  3. er3dfx

    er3dfx

    Joined:
    Nov 22, 2022
    Posts:
    3
    I found the reason. Subscene needs to build dots-specific files to work on the actual device. The scenes need to be added to the build settings together for the construction to work. Of course, there's an API to manually build the runtime files required for these subscenes. Addressable didn't add the scenes to the build settings, which resulted in the runtime files for the subscenes not being created. I must say, the documentation lacks emphasis on this point regarding subscenes.
     
    Laicasaane likes this.
  4. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    288
    For my case I do include those scenes in the build settings but it doesn't work.
     
  5. er3dfx

    er3dfx

    Joined:
    Nov 22, 2022
    Posts:
    3
    Please check if the "entityScenes" and "contentarchives" folders have been generated in the StreamingAssets folder. If they are present but the issue still persists, try upgrading the Unity version or creating a new project to see if it resolves the problem.
     
  6. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    288
    There is EntityScenes folder, but no ContentArchives. What could this mean?