Build does not load Entities

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

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.

[9180293--1278695--Player.txt|attachment](upload://aq3A1iWAMN6tfg2dZtrKrX06HAZ.txt) (29.2 KB)
[9180293--1278698--ECSTest (1).zip|attachment](upload://gOawTvQkPNUhoOXLT18LG2lm0Ac.zip) (75.1 KB)

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.

This has been fixed for 2022.3.6
https://unity.com/releases/editor/whats-new/2022.3.6
9190958--1280921--upload_2023-8-3_16-17-56.png

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.

Just switch to Unity LTS version. You are working on “unstable” release, which may contain many incompatibilities.