EntitySceneReference not detected in build from MonoBehaviour

Hi,

I’m using a MonoBehaviour to handle the sub scenes loading and unloading an I keep references to the subscenes through the inspector with a List<EntitySceneReference>.

The issue is that the Subscenes referenced in the list are not part of the build.

Based on the documentation, I would have assumed this was ok : Load a scene | Entities | 1.0.16

But I get “Loading Entity Scene failed because the entity header file couldn’t be resolved” in build, unless I create another scene, not used by the game, that references all my subscenes.

I would presume that, as the example code on that page suggests, scanning for EntitySceneReference works in subscene component data, what with how easy it is to set up data lookup in entities, and not for normal UnityEngine.Object data. Perhaps instead use IEntitySceneBuildAdditions to supply the necessary scenes at build time by opening the appropriate scene or object and reading the MonoBehaviour content there.

1 Like

Thanks, this interface does not exists in 1.0.16. Glad there is an option for newer versions.