Anything that about the adressables is clear, but when I intend bake an entityprefab and allow loading them from mod that’s makes me frustrated.
Technicaly I found working flow, but it’s looks like a hack:
- bake entityprefabs by RemoteContentCatalogBuildUtility.BuildContent() and NOT postprocess by RemoteContentCatalogBuildUtility.PublishContent() as it described in documentation. I didn’t now why, but postprocessed files just didn’t work when its local.
1.1) Save pairs of name:guid as json database to easyear access like in adressables. - place generated files in some folder like “StreamingAssets/Core”.
- at runtime copy all generated files from core game and mods (expect archive_dependencies.bin) in “StreamingAssets/EntityScenes” and “StreamingAssets/ContentArchives”.
- call RuntimeContentSystem.LoadContentCatalog(null, null, “all”) once and RuntimeContentManager.LoadLocalCatalogData(…) with path of “archive_dependencies.bin” for core game and each mods.
- load prefabs by SceneSystem.LoadSceneAsync() by passing guid.
- when list of mods will be modified clear all files from step 3 and repeat step 3.
note: I expected that RuntimeContentManager.LoadLocalCatalogData(…) able to load files from any accessible directory, but it didn’t. Not sure that’s bug, by design or I cannot found correct way to work it. Official documentation extremely poor about it.
Anyway, that’s weird, but it works. I hope it just misunderstanding and exist more clear way to work with it. I just getting to know how work with DOTS so I glad to hear any advice.