I am trying to build android version with some subscene. I need to load subscene at runtime depend on current level index, so I created a subscene data base by using the scriptable object like the following image. It worked well on the editor, but didn't work on android device. I got this error when run the game on my device.
Error Unity Loading Entity Scene failed because the entity header file couldn't be resolved: guid=082399be3045c3b488f849cbc3d28ef3.
Does anyone know how to configure those subscenes with the build?
#Build Android version with sub scenes
1 messages · Page 1 of 1 (latest)
subscenes shouldn't be in your build list they will be converted during build stage and the scene is never used again
so all you need to include is the root scene the subscenes exist in
as for android, i haven't built on it for years so not aware if there are current issues with it sorry
because I load the subscene at runtime so all subscene were not attach to any root scene. That why I have to list them in the build setting
you are attaching the scene
not the subscene in the build settings
the scene is never used in a build
so all subscene were not attach to any root scene
i don't even know what you mean by this? to be a subscene it has to have a subscene component and be in a scene
otherwise it's just a normal scene ^_^'
so with the api SceneSystem.LoadScene, it is used in what case?
SceneSystem.LoadSceneAsync has 3 overrides - none of them take Scene
are you using 0.51?
no I'm using 1.0.0-pre.15
I used the third override, I passed the scene GUID from my scene database.
yep thats fine
was just curious because LoadScene exists in 0.51
and in 0.51 if you built with build settings like above you would get your error
but are your scenes in a subscene script?
but even if I have guid of that scene, I still have to include my level scene as subscene of a scene right?
no, it stands alone like a normal scene
yes
oh, so the scene system seems useless in my case
how so?
subscenes really only store their GUID
[HideInInspector]
Hash128 _SceneGUID;```
so opening a subscene is usually done with guid
(or you can use the entity which is personally how i do it)
but unity still has to know you want it to be a subscene and convert it as such
In my case, I have multiple level maps, each map I store in a scene. When player go to the battle, I will load the scene with the corresponding current level index. but these scenes consist entirely of entities so it must be in the subscene
so what I should do in my case? create a normal scene with a subscene inside, and load that normal scene instead of 'subscene' right 😅
so How do manage the subscene? by name or by index. And when you load a scene include all subscenes, is it heavy and redundant with unused levels?