I am following the unity example published for Addressable and PAD integration
I have one doubt , In entire project I don’t see any of the class pointing or using the Play asset delivery or Core Google API , so I am confused if it really uses PAD or just a code representation.
And if it is using PAD library by google then how it is doing Please explain.
one more thing if on runtime I want to download the OnDemand pack then how to do that , is it there in example or I have to write a code.
Hi @koumodaki the project uses the Unity Play Asset Delivery APIs, which are basically wrappers of the Core Google API.
To load asset packs at runtime, you can reference the code in the sample project or follow the instructions in the Unity Play Asset Delivery manual page. Unity - Manual: Play Asset Delivery.
Likely you’ll be using AndroidAssetPacks.DownloadAssetPackAsync to load the asset packs. Unity - Scripting API: Android.AndroidAssetPacks.DownloadAssetPackAsync
1 Like
Facing this problem now
Unable to open archive file: /data/data/com.com.padadd.PlayAssetDelivery/files/assetpacks/CustomOnDemandTest/1/1/assets/ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle
2021-10-27 15:36:18.972 18601-18623/? E/Unity: Failed to read data for the AssetBundle ‘ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle’.
2021-10-27 15:36:18.974 18601-18623/? E/Unity: RemoteProviderException : Invalid path in AssetBundleProvider: ‘/data/data/com.com.padadd.PlayAssetDelivery/files/assetpacks/CustomOnDemandTest/1/1/assets/ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle’.
System.Action2:Invoke(T1, T2) UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1:set_OperationException(Exception)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, Exception, Boolean)
UnityEngine.ResourceManagement.ResourceProviders.AssetBundleResource:CompleteBundleLoad(AssetBundle)
Unable to open archive file: jar:file:///data/app/~~w89iurN8p6Qa9KBmob7rDw==/com.com.padadd.PlayAssetDelivery-tKkXVMATOFHWk-6gzCVa9A==/base.apk!/assets/aa/Android/ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle
2021-10-27 15:50:57.807 25013-25048/? E/Unity: Failed to read data for the AssetBundle ‘ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle’.
2021-10-27 15:50:57.809 25013-25048/? E/Unity: RemoteProviderException : Invalid path in AssetBundleProvider: ‘jar:file:///data/app/~~w89iurN8p6Qa9KBmob7rDw==/com.com.padadd.PlayAssetDelivery-tKkXVMATOFHWk-6gzCVa9A==/base.apk!/assets/aa/Android/ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle’.
Are you getting this error from the sample project?
It looks like it is trying to load the ‘ondemandtest_assets_all_bf90fd96194b992b01cf1452180c3511.bundle’ from the base.apk, but the bundle doesn’t exist in the apk.
bundle is there , still it is giving this , do you thing there is any other area where I can see for resolution , Here is my setting screen shot .
.
Unable to open archive file: jar:file:///data/app/~~y6prQWY70SDUqAZMYsU6nA==/com.vedantu.playground-mLDFV0s7G6lnv6yLZhx_TA==/base.apk!/assets/aa/Android/menutilecontent_assets_all_9dbb369b0dbfa0d8817b52b85bffc7eb.bundle
2021-10-27 23:00:52.365 23248-23278/? E/Unity: Failed to read data for the AssetBundle ‘menutilecontent_assets_all_9dbb369b0dbfa0d8817b52b85bffc7eb.bundle’.
2021-10-27 23:00:52.366 23248-23278/? E/Unity: RemoteProviderException : Invalid path in AssetBundleProvider: ‘jar:file:///data/app/~~y6prQWY70SDUqAZMYsU6nA==/com.vedantu.playground-mLDFV0s7G6lnv6yLZhx_TA==/base.apk!/assets/aa/Android/menutilecontent_assets_all_9dbb369b0dbfa0d8817b52b85bffc7eb.bundle’.
System.Action`2:Invoke(T1, T2)
Hmm your setup looks correct. Could how you provide some more information about how you are getting the error?
Are you trying to run the APK that is generated by the Editor (Build Settings > Build) and do you have “Split Binary Application” enabled (Project Settings > Player > Publishing Settings > Minify)?
If so, then you might be running into this bug:
The issue is if the APK built has “Split Binary Application” enabled, then Application.streamingAssetsPath is incorrectly pointing to the APK instead of the main.obb where all your streaming assets are located (for example AssetBundles).
Hello. We fixed this bug by downgrading com.unity.addressables to version 1.18.19. The error was reproduced on version 1.21.14.
1 Like