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

Bug Build does not load Entities

Discussion in 'Entity Component System' started by oblivion1818, Jul 29, 2023.

  1. oblivion1818

    oblivion1818

    Joined:
    Aug 29, 2013
    Posts:
    4
    Hi,

    I have been working on a game for few weeks with the new ECS 1.0.x, and now I am ready build it.
    However when I run a build nothing in the sub scene shows up, only things in the main scene.
    After not finding many answers, I made a completely fresh project and just created a sub scene with a cube in it.
    These are the errors I get when running it in a build
    Top level scope allocation is permitted only on the main thread.

    and
    Streamed scene with  261ms latency from D:/Projects/ECSTest/Builds/ECSTest_Data/StreamingAssets/EntityScenes/8addc5a5a764d934983557bd7469b43e.0.entities
    NullReferenceException: Object reference not set to an instance of an object.


    Everything works fine in the editor.

    Any help would be very welcome, I have included the player log and the fresh project I put together.
     

    Attached Files:

    mirex97 likes this.
  2. oblivion1818

    oblivion1818

    Joined:
    Aug 29, 2013
    Posts:
    4
    So I am still investigating, but seems to be an issue with URP. I made the same simple project in HDRP and it worked. Testing a bit more now with a simple system.
     
  3. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    288
  4. oblivion1818

    oblivion1818

    Joined:
    Aug 29, 2013
    Posts:
    4
    So having spent more time on this, it is not URP vs HDRP, but actually Unity 2023.1.0 not allowing sub scenes to load correctly. Hopefully will be fixed soon.
     
    apkdev likes this.
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,556
    Just switch to Unity LTS version. You are working on "unstable" release, which may contain many incompatibilities.