I really cannot figure out how to move or even instantiate entities across subscenes, I tried reassigning the shared components entity to the subscene I wanted but this seems to break everything
{
foreach(var entity in _applySceneTagEntities)
{
state.EntityManager.SetSharedComponent(entity, new SceneTag
{
SceneEntity = SystemAPI.GetSingleton<MapLoadState>().CurrentSceneEntity
});
}
_applySceneTagEntities.Clear();
}````
This seems to break a lot of things including putting my editor in a error loop that can only be fixed by restarting unity. >< .
The problem is,I have maps for my game I'm using subscenes to manage the maps. When the user builds a structure on the map and then we want to unload that map, those user built entities are assigned to the subscene where the authoring component was, which is in my bootstrap subscene. I want to be able to instantiate a entity and set its subscene reference so they get unloaded when the map unloads.