I’m trying to use new content archive approach to load baked scenes. There are few issues I encountered
- Code inside RuntimeContentSystem is working differently in editor and a build. and I couldn’t kinda find a way to make it works in editor same way as in the build

I tried to load a scene from content archive in a windows mono build.
catalogs.bin is loaded and cached in persistent data looks fine, but whenever I try to actually load scene by weak reference - it’s fails for gameobject scenes and it silently stuck on “NotYetProcessed” for entities scene.
I tried both loading from streaming assets and external location(with published content archives).

it works all fine in editor sicne loading is overriden for editor. I enabled all necesery compiler arguments for the build. still nothing.

When loading gameobject scene in build I get this error
Debug.Log("Loading Scene");
Debug.Log($"Reference {singleton.ValueRW.GameObjectSceneReference.Id.GlobalId.AssetGUID} Valid={singleton.ValueRW.GameObjectSceneReference.IsReferenceValid}");
singleton.ValueRW.IsLoading = true;
singleton.ValueRW.GameObjectSceneReference.LoadAsync(new ContentSceneParameters
{
autoIntegrate = true,
loadSceneMode = LoadSceneMode.Additive
});
I traced it back to RuntimeContentManager
unsafe public static Scene LoadSceneAsync(UntypedWeakReferenceId sceneId, ContentSceneParameters loadParams)
{
#if ENABLE_CONTENT_DIAGNOSTICS
LogFunc?.Invoke($"Loading scene {sceneId}");
#endif
#if ENABLE_PROFILER
RuntimeContentManagerProfiler.RecordLoadSceneRequest();
#endif
if (!Catalog.TryGetSceneLocation(sceneId, out var fileId, out var sceneName))
{
#if UNITY_EDITOR
return OverrideLoader.LoadScene(sceneId, loadParams);
#else
throw new Exception($"Invalid scene id: {sceneId}");
#endif
}
...
}
This is how I initialize the content delivery:
private void Start()
{
#if ENABLE_CONTENT_DELIVERY && !UNITY_EDITOR
Debug.Log("Content Delivery Enabled");
Debug.Log("Remote URL Root: " + this.remoteUrlRoot);
Debug.Log("Cache URL Root: " + Application.persistentDataPath);
ContentDeliveryGlobalState.LogFunc = Debug.Log;
ContentDeliveryGlobalState.Initialize(this.remoteUrlRoot, Application.persistentDataPath + "/content-cache", this.initialContentSet, s =>
{
Debug.Log("Content Delivery State: " + s);
if (s >= ContentDeliveryGlobalState.ContentUpdateState.ContentReady) this.LoadMainScene();
});
Debug.Log(ContentDeliveryGlobalState.CurrentContentUpdateState);
#else
this.LoadMainScene();
#endif
}
it looks like archive_dependencies has some issues. like double Dependency
Archive: eddb48c0d001436a9f80ce236af74441
File: eddb48c0d001436a9f80ce236af74441
Archive: c15532d57ef970849b07ecedc6a8f223
File: c15532d57ef970849b07ecedc6a8f223
Scene: c15532d57ef970849b07ecedc6a8f223:102900000
Dependency: eddb48c0d001436a9f80ce236af74441
Dependency: 00000000000000000000000000000000
Archive: 00000000000000000000000000000000
File: 00000000000000000000000000000000
I checked entities examples github project but it only has example for loading in the editor without actual built content. I checked the documentation, it also lack much explanation about building and delivering the content.
if anyone could point me in some direction, I would realy appreciate. Unity Editor version: 2022.3.8f1 Entities version: 1.0.16
![]()
