Thanks! looking at those docs i am using RuntimeContentManager to Load in my assets however i run into yet another issue. my code at the moment is as follows
public static void LoadContentArchive(string pluginName)
{
string buildLocation = Path.Combine(Application.persistentDataPath, "build", pluginName);
Uri fileUri = new Uri(buildLocation + "/" + pluginName + "-RemoteContent" + "/" + "catalogs.bin");
RuntimeContentSystem.LoadContentCatalog(fileUri.ToString(), buildLocation + "/" + pluginName + "-cache", "all");
RuntimeContentManager.Initialize();
AssetBundleCreateRequest assetsRequest = AssetBundle.LoadFromFileAsync(buildLocation + "/" + pluginName + "_Assets");
AssetBundle assetsBundle = assetsRequest.assetBundle;
foreach (var asset in assetsBundle.LoadAllAssets())
{
if(asset != null)
{
UntypedWeakReferenceId obj = (UntypedWeakReferenceId.CreateFromObjectInstance(asset));
RuntimeContentManager.LoadObjectAsync(obj);
}
}
AssetBundleCreateRequest sceneRequest = AssetBundle.LoadFromFileAsync(buildLocation + "/" + pluginName + "_Scene");
AssetBundle scenesBundle = sceneRequest.assetBundle;
foreach (var scene in scenesBundle.LoadAllAssets())
{
UntypedWeakReferenceId sceneRef = (UntypedWeakReferenceId.CreateFromObjectInstance(scene));
ContentSceneParameters sceneParams = new ContentSceneParameters()
{
loadSceneMode = LoadSceneMode.Single,
localPhysicsMode = LocalPhysicsMode.None,
autoIntegrate = true,
};
RuntimeContentManager.LoadSceneAsync(sceneRef, sceneParams);
}
}
on several debugging it looks like when i get the contentDeliveryUPdate state, it is just set to None, even though im pointing it to the right path i've double checked. Another issue is when im loading in my asset file it gives the error
Asset file does not exist or does not contain LFID 0
on debugging i realise that my weak reference id is always set to 00000:0 (which im assuming is null) for every asset despite the asset being valid