Why the SubScene not Baking in the Android build ?

In my Unity project using unity 2022.2.8f1 & DOTS 1.0.0-pre.65,
1- I have a scene that contains a subscene which Loads & Bakes correctly in the editor, but fails to Bake in the built version because I'm using game object prefabs that are stored and referenced in hierarchy within a list. I believe that Unity is attempting to bake before assigning the prefabs to the list in Awake when the app is running.
2- Is it possible to load a subscene during runtime instead of having it autoload when the main scene loads?
3- Are there alternative methods to convert game objects to entity prefabs in Unity, besides using subscenes?

It probably won't fix your issue, but i just want to note you shouldn't include sub scenes in build settings

1 Like

I am having this issue in webgl right now

1 Like

it seems like I have identified the issue with my subscene.
The subscene appears to be loading correctly in the Android build, but I'm experiencing problems with baking.
This could be due to the fact that I'm using game object prefabs that are stored and referenced in the main scene hierarchy within a list.
I believe that Unity is attempting to bake before assigning the prefabs in Awake when the app is running, which is causing Null Reference Exceptions. Do you have any suggestions for how I can resolve this issue?


Resolved the error by moving the lists of the GameObject prefabs references from the main scene to the subscene.