Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Help Wanted Using Addressables along with Google Play Asset Delivery.

Discussion in 'Addressables' started by Zulug, Jun 5, 2020.

  1. mybigorangehead

    mybigorangehead

    Joined:
    Jun 25, 2016
    Posts:
    3
    Hi!

    I am trying to include my addressable's asset bundles in a "install-time" Play Asset pack. Can anyone help me understand @supersolid-jelte solution?

    I understand that we want to:
    - Create Play Asset packs using the Asset Bundles the Addressable system would place in the Streaming Assets folder (by default)
    - Delete the Asset Bundles from the Streaming Assets folder

    What I do not understand is how to use the CustomAssetBundleResource script posted. How can I use this custom AssetBundle provider with Addressables?


    Thanks!
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,112
    You can also see the script that I posted earlier, that one is complete and can just be copy pasted. Once the code is on your project, you can go into the Addressables Group Window, select all of your groups and in the inspector, under advanced settings, select the custom asset bundle provider from the dropdown list.
     
  3. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    27
    For Jelte's solution, I see a post saying that the Advanced Options in Content Packing & Loading have to be set like this.

    And you have to Create config for Addressables Group before building aab.

    The post is in Chinese and I use DevTools of Google Chrome to see the whole article.
    https://blog.csdn.net/egostudio/article/details/118787073

    But actually I am facing the problem that the aa folder which contains addressables assets will be added into Streaming Assets folder after pressing the build button. And finally the assets will be imported both inside and outside of the base part. I wonder deleting it during building will cause any problems.

    upload_2021-7-20_12-30-23.png
    I have also tried to set both Asset Bundle Provider to the custom AssetBundle Provider. But not sure is it the only step I have to do as there is no big different: the asset bundles are still double imported.

    Also, the project also seems to be messed up with Jelte's plugin. Once I don't Create config for Addressables Group, which is the additional function from Jelte's plugin, the bundles outside the base folder will use the old setting according to the not-updated PlayAssetPackConfig.json in Library folder.

    Hope the official staff could update the process on this issue. At least let us know that Addressables assets are not abandoned.
     
    Last edited: Jul 20, 2021
  4. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    Hi everyone I was hoping to post this once it was 100% ready, but since the August deadline is rapidly approaching:
    I have PR up that adds a new sample project that shows how to use Addressables with Play Asset Delivery. The PR should be fully reviewed soon, and then the project will be available in our Samples repository.

    Since Addressables moves all content to StreamingAssets during a player build, by default all your Addressables content will be assigned to the auto-generated streaming assets pack. The sample project primarily demonstrates how to assign content to custom fast-follow or on-demand asset packs. We have also taken the approach of assigning any content meant for install-time delivery to the streaming assets pack.
     
  5. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    65
  6. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    Hi @pillakirsten. Any plan to integrate this Google PAD feature directly into Addressables package in future?
     
  7. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    Hi @optimise there are no plans at the moment. Is there a reason why it should be included in the package?

    The sample project doesn't really add any new features. It mostly contains custom scripts that follow the instructions listed in the Play Asset Delivery manual page. The only part that's Addressables-specific is the remapping of load paths to the asset packs location (that logic is split between the custom AssetBundle provider and the script where we call InternalIdTransformFunc, both of which use existing public API).
     
  8. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten I just feel like putting the solution at sample repo is not really officially supported and will be deprecated at any point of time.
     
    apkdev likes this.
  9. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @optimise Thanks for the feedback, technically the samples repository is also "officially supported". But it is true that the posts listed in the github issues tracker aren't being looked at that often. If there are any bugs involving the samples projects, please file a bug report through the usual processes. We will work on improving on how bugs related to the samples projects get added to our regular workflow.
     
  10. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten Forget to tell u the most important reason to integrate android PAD feature into addressable package is if google change it to yet another new boring delivery format once again in future I can just update to newer version of addressable instead of pull it from sample repo and update manually myself which is quite tedious and not efficient.
     
  11. EdoC-QWERTY

    EdoC-QWERTY

    Joined:
    Feb 1, 2020
    Posts:
    66
    Hello, I tired to implement PAD with Addressables by following the steps on the git hub guide.
    All my addressables were Scenes. Every Scene is a different level that is loaded from the addressables instead of including it to the build
    After the build was completed all the scenes were deleted from the project folder!
    I had a backup obviously but is this an expected behavior?
    How am I suppose make changes to addressables if all the scenes are removed and packed into bundles?
     
  12. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    Hi @EdoC-QWERTY do you mean that the scene files (.unity) themselves are being deleted? The sample project custom build script will move any built bundles (in Library/com.unity.addressables/aa/[TargetPlatform]) assigned to fast-follow or on-demand custom asset packs to the Assets/PlayAssetDelivery/CustomAssetPackContent folder.

    Are you perhaps putting your scene files in that folder? The folder's contents will be deleted and replaced with the newly built bundles during a build.
     
    Last edited: Aug 12, 2021
  13. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @optimise By "update manually myself" do you mean having to modify your own project to integrate the solution added in the samples project? If there is a new delivery format, we will probably create a new sample project or update the existing one.
     
  14. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten Ya. I need to copy it from sample repo to my project. If it's integrated into addressables package by default then I no longer need to do this step anymore.
     
    TheVirtualMunk and pillakirsten like this.
  15. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    Hi @pillakirsten I notice a super important use case that need to implement something at addressables package first. From my testing, currently it's not working when u didn't choose to build aab and u can't directly install aab at phone just like apk. Is that possible to make PAD working at apk build too as I need apk to speed up testing and distribute build? Is there any toggle true/false API that I can call to build apk that will pack in PAD format at Unity 2020.3.15? If not can u provide one in next Unity 2020.3.x? If it's not possible can u improve addressable package that have button to switch schema at group name/addressable name of Addressables Group. Basically what I want is I can switch all of the group name/addressable name that is using Asset Pack Content to Packed Asset then I can build working apk. For production, I can switch it back to use Asset Pack Content again to build aab.
     
  16. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @optimise To get the APK, I had to upload the aab to the Google Play Console and then the site generates several device-specific APKs listed in App bundle explorer > Downloads. For my case I just downloaded the "Signed, universal APK". Does that help?
     
  17. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten Not really. I want to able to build the PAD compatible APK directly at Unity instead of go through Google Play Console. I need super fast iteration speed and this extra Google Play Console step make the iteration speed slow down a lot.
     
  18. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @optimise You can use bundletool to extract the APKs from the AAB directly: https://developer.android.com/studio/command-line/bundletool#generate_apks

    In terms of the sample project, if you want to switch from building the ABB to a regular APK, I think you just need to select all the groups and replace the Content Packing & Loading > Advanced Options > Asset Bundle Provider to the default one (AssetBundle Provider). Then just run Build > Default Build Script to keep your bundles in the expected load path.

    If that's still a pain, we can probably add a button to the project that does the "group settings re-configuration" part automatically.
     
  19. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten Awesome. I would like "group settings re-configuration" part be be as an public API that I can call as I create a menu item that will enable/disable specific group name/addressable name to be include in build.

    Btw actually is that possible to do other way round that implement another toggle to tick feature to build PAD compatible APK directly at Unity instead of AAB? From what observe, it's possible to do that as I try to tick both Build App Bundle (Google Play) and Split Application Binary then press Build and Run at Build Settings I can push the build to phone and run it directly. I just can't get APK file at my build pc and get AAB file instead. Can you make it to get APK file? Actually the PAD is implement by @JuliusM?
     
  20. EdoC-QWERTY

    EdoC-QWERTY

    Joined:
    Feb 1, 2020
    Posts:
    66
    Hello @pillakirsten , yes I mistakenly put all the scenes into that folder. Anyway I had a backup.

    I get an error during the addressable build that I am not able to fix.
    This is the console log
    Code (CSharp):
    1. FileNotFoundException: Library/com.unity.addressables/aa/Android/Android/ondemandcontent_scenes_all_d1d7f99f410c53af73c475135c2308d1.bundle does not exist
    2. System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    3. AddressablesPlayAssetDelivery.Editor.BuildScriptPlayAssetDelivery.ProcessGroup (UnityEditor.AddressableAssets.Settings.AddressableAssetGroup group, System.String assetPackName, AddressablesPlayAssetDelivery.DeliveryType deliveryType, System.Collections.Generic.Dictionary`2[TKey,TValue] assetPackToDataEntry) (at Assets/PlayAssetDelivery/Editor/BuildScriptPlayAssetDelivery.cs:133)
    4. AddressablesPlayAssetDelivery.Editor.BuildScriptPlayAssetDelivery.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) (at Assets/PlayAssetDelivery/Editor/BuildScriptPlayAssetDelivery.cs:89)
    5. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:77)
    6. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/Build/DataBuilders/BuildScriptBase.cs:84)
    7. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContentImpl () (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/Settings/AddressableAssetSettings.cs:1921)
    8. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContent () (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/Settings/AddressableAssetSettings.cs:1903)
    9. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildPlayerData () (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:273)
    10. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildScript (System.Object context) (at Library/PackageCache/com.unity.addressables@1.16.19/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:268)
    11. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <ef3b6bf002d8435a97b4e938f6c49b02>:0)

    The ondemandcontent_scenes_all_d1d7f99f410c53af73c475135c2308d1.bundle file is located in

    Assets\PlayAssetDelivery\CustomAssetPackContent\OnDemandContent.androidpack


    Could you help me?

    EDIT: I had a different version of addressable package installed. After updating to 1.18.15 the error is gone.
     
    Last edited: Aug 14, 2021
  21. Adam_Weesner

    Adam_Weesner

    Joined:
    Aug 6, 2020
    Posts:
    18
    @pillakirsten I'm running into that issue above as well, but my version of Addressables is at 1.18.15. I'm also using the exact Unity version (2020.3.15f2) that the sample uses. When I select Build > New Build > Play Asset Delivery, I receive this error:

    Code (CSharp):
    1. Library/com.unity.addressables/aa/Android/Android/mountainartstatic_assets_all.bundle does not exist
    2. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    3.  
    4. Addressable content build failure (duration : 0:00:00)
    5. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    It seems to occur on the first addressable group with "FastFolowContent". AlI of my groups have the Asset Bundle Provider set to use the “Play Asset Delivery Provider”. I tried a few different methods to fix this, such as setting different Bundle Naming Modes on that group, changing the compression method, shortening the name of the group, etc... This is what the offending group looks like.

    upload_2021-8-16_9-49-28.png

    Any ideas?
     
  22. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @Adam_Weesner Hmm interesting, what bundle files are located in the Library/com.unity.addressables/aa/Android/Android folder? I wonder if it is looking for a version of mountainartstatic_assets_all.bundle that has a different filename, but was not actually created in that directory.
     
  23. Adam_Weesner

    Adam_Weesner

    Joined:
    Aug 6, 2020
    Posts:
    18
    I do see "mountainartstatic_assets_all.bundle" inside that folder. I tried purging my Build Cache and deleting the com.unity.addressables folder, but I still receive that error.
     
  24. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @Adam_Weesner Is it possible to send a zip of the project?
     
  25. Adam_Weesner

    Adam_Weesner

    Joined:
    Aug 6, 2020
    Posts:
    18
    @pillakirsten I was able to replicate the issue in the attached sample project. I just added an additional Addressable group similar to the one that was giving me issues in my project. Just select Build > New Build > Play Asset Delivery, and you should see those errors I mentioned.
     

    Attached Files:

    pillakirsten likes this.
  26. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @Adam_Weesner I just merged in a fix for the bug. It was trying to move bundle files that were already moved. You can take the changes made to the BuildScriptPlayAssetDelivery.cs script. Let me know if you run into any other issues!
     
  27. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    I just tested the PAD support in 2020.3.16f1. It works fine with local addressable bundles (in StreamingAssets folder), no custom code or plugins required at all if all you need is one install-time asset pack to overcome 150mb Google Play limit. Just set your addressable profile accordingly, tick "Split app binary" and "Build app bundle" checkboxes and you're good to go.

    I've successfully uploaded bundle this way to Google Play internal testing and tested on device.
     
    Personuo, jiyongman and Jonas-Neuston like this.
  28. Adam_Weesner

    Adam_Weesner

    Joined:
    Aug 6, 2020
    Posts:
    18
    @phobos2077 What do you mean exactly by "just set your addressable profile accordingly"?
     
  29. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    So that bundles that you need to be installed from Google Play will be placed into StreamingAssets folder. This is the "LocalBuildPath" in default configuration.
     
  30. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    65
    That's good to hear @phobos2077. Our team will try it out in the near future.
     
    phobos2077 likes this.
  31. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    1,019
    @pillakirsten I think I really need a button to the project that does the "group settings re-configuration" part automatically. Is that "group settings re-configuration" just swapping regular schema <-> PAD schema back and forth?

    And also from my last testing, addressables PAD feature will not work properly when u press Default Build Script then Play Asset Delivery at Addressable Group window. I guess u will need to fix it in order to support building both regular APK and AAB without needing to press clear full addressables cache every time to solve this issue.
     
  32. Adam_Weesner

    Adam_Weesner

    Joined:
    Aug 6, 2020
    Posts:
    18
    @phobos2077 What exact Build and Load paths do you have set in your project? I've been struggling to get this working. I tried using the default paths, as well as several methods of pointing to the StreamingAssets, but the console reads this while booting the game:
    Unable to open archive file
    RemoteProviderException : Invalid path in AssetBundleProvider
     

    Attached Files:

  33. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    Use default values (the same for Remote)
    upload_2021-8-20_21-17-19.png
     
  34. SinTrace

    SinTrace

    Joined:
    Jan 3, 2017
    Posts:
    14
    I am glad that the official has provided examples,
    But I would like to know what are the required versions of unity and addressables?
    Thanks.

    Our current version is
    Unity: 2019.4.21f
    Addressables: 1.16.15
     
  35. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    792
    I am not sure which Addressables version you would need (I'll leave that for others to answer), but you will need at least Unity 2019.4.29f1. Note that you will have to use a custom Gradle version as well https://docs.unity3d.com/2019.4/Documentation/Manual/play-asset-delivery.html
     
  36. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @optimise Yes I've created a ticket to work on that request. I'll also put in a note to investigate how the build cache is affected.

    The "group settings re-configuration" should just involve swapping the Asset Bundle Provider (AssetBundle Provider <-> PAD Provider) for each group, then building Addressables using one of the two build scripts. The PAD schema is only used in the PAD build script, so enabling/disabling it when using the Default build script results in the same behavior.

    @SinTrace The sample project uses Addressables APIs that have been around for a while, so 1.16.15 should work just fine.
     
  37. SinTrace

    SinTrace

    Joined:
    Jan 3, 2017
    Posts:
    14

    I will try, thanks!!
     
    Last edited: Oct 1, 2021
  38. Cristian_O

    Cristian_O

    Joined:
    Oct 12, 2017
    Posts:
    8
    When it comes to automate the build process for multiple platforms, how can I change through code the 'Asset Bundle Provider' property on the Group Schema (under 'Advanced Options') ?

    I've been searching through the documentation, but I couldn't find any way of actually modifying that property.

    The issue is that if we set the 'Asset Bundle Provider' to 'Play Asset Delivery Provider', that means the iOS build won't have any addressables content.
     
  39. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    BundledAssetProviderType field seems to be what you're looking for. Alternatively you can always build the platform-specific logic into your custom provider (fallback to default provider logic if iOS is detected), although build-time distinction is always preferred.
     
  40. Cristian_O

    Cristian_O

    Joined:
    Oct 12, 2017
    Posts:
    8
    Unfortunately, the 'BundledAssetProviderType' only has a getter, so I can't use that to change the value.

    Looking at the code for the 'Play Asset Delivery Provider', it seems to fallback to the default logic if the current active platform is not Android, so not sure if that would be any help. Are you using this solution yourself to automate builds for multiple platforms ?

    The only way I could make it work for an iOS build is to manually change the 'Asset Bundle Provider' to use the default value, which is 'AssetBundle Provider'.
     
  41. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    You're right. Seems like an oversight on Unity's side. In this case I would've probably used reflection to forcibly modify the private field. It's not like you can go far writing custom stuff for Addressables without hacks like these... too much internal/private stuff.

    So basically it should work for iOS out of the box, what is the issue then? I don't use this provider myself, so I don't know. But I have custom Bundle provider that does special platform-specific stuff on Android, but falls back to default behavior at runtime.
     
  42. Cristian_O

    Cristian_O

    Joined:
    Oct 12, 2017
    Posts:
    8
    Well, that's what I expected, but this isn't the case, unless I'm doing something completely wrong.

    The issue that I have is that the addressables content can't be accessed at runtime - getting null refs when trying to load any assets.

    The android build works fine, there are no problems - currently using the guidelines supplied here: https://github.com/Unity-Technologies/Addressables-Sample#advancedplay-asset-delivery

    I've tried building the addressables content for iOS using the same exact method as for Android, but it doesn't work. I've also tried building the addressables content with the 'Default Build Script', but that still didn't help. I've kinda ran out of options. The only reliable way that I've found working is to manually change the 'BundledAssetProviderType' and build the addressables content with the 'Default Build Script'.
     
  43. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    330
    Sounds like there is a bug in this custom provider you're using. I suggest looking at default provider source code and comparing.
     
  44. Cristian_O

    Cristian_O

    Joined:
    Oct 12, 2017
    Posts:
    8
    I'm using the one from the sample, haven't changed it a bit.

    I guess I'll keep tinkering with it, would be good to know if the sample code should work straight out of the box and doesn't break builds for other platforms.

    Also, it would be amazing if we would be able to change the 'BundledAssetProviderType' property, not sure if there's a reason that a settor is not exposed for it or it was just straight up omitted.
     
  45. Cristian_O

    Cristian_O

    Joined:
    Oct 12, 2017
    Posts:
    8
    I've managed to get this working using reflection. Not the best approach but it works...

    Thanks for the suggestion @phobos2077
     
    phobos2077 likes this.
  46. thanhnguyenkim

    thanhnguyenkim

    Joined:
    May 8, 2015
    Posts:
    2
  47. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    101
    @Cristian_O Interesting, the sample project was primarily tested for Android. I'll create a ticket to investigate how it behaves on other platforms.
     
  48. SinTrace

    SinTrace

    Joined:
    Jan 3, 2017
    Posts:
    14
    @JuliusM
    @pillakirsten

    We have added PAD to our application,
    There are no obvious problems with the packaged aab.
    Except on Google Pixel series devices, there is a chance of errors,
    The "unable to initialize the unity engine" error will pop up at the initial run.
    Compare the successful log and the failed log,
    It can be clearly found that the /split_UnityDataAssetPack.apk/assets/bin/Data/datapack.unity3d package of resources is not loaded.

    Has anyone encountered the same situation?
    How should I fix this problem?

    Reported: (Case 1363795) Play Asset Delivery on Google Pixel devices

    Unity: 2019.4.29f
    Addressables: 1.16.15
    Gradle: 6.1.1
    Android Gradle: 4.0.1
     

    Attached Files:

    Last edited: Sep 23, 2021
    Cixelyn likes this.
  49. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    201
    So how much of the sample PAD project needs to be copied into our game project to make addressables work with the split binary option? When I click "Add Schema" I don't see a Play Asset Delivery option.

    Also, we're shipping to iOS/Android/PC. Do we need special addressables configuration for each platform, or can we set this PAD stuff up and have it work for each platform?

    Also, from what you've said above it seems like addressables should just work with PAD at this point if you only need install-time and use the default streaming asset bundle. We're doing exactly that and get these errors:

    Code (CSharp):
    1. 09-15 10:50:56.639 27740  2255 E Unity   : RemoteProviderException : TextDataProvider : unable to load from url : jar:file:///data/app/~~689q54a8zSXXloEqeqgmbA==/studio.shortsleeve.voodoodetective-XMFOqP0J2uMakI-c6HOVJQ==/base.apk!/assets/aa/settings.json
    2. 09-15 10:50:56.639 27740  2255 E Unity   : UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
    3. 09-15 10:50:56.639 27740  2255 E Unity   : ResponseCode : 404, Method : GET
    4. 09-15 10:50:56.639 27740  2255 E Unity   : url : jar:file:///data/app/~~689q54a8zSXXloEqeqgmbA==/studio.shortsleeve.voodoodetective-XMFOqP0J2uMakI-c6HOVJQ==/base.apk!/assets/aa/settings.json
    5. 09-15 10:50:56.639 27740  2255 E Unity   :
    6. 09-15 10:50:56.639 27740  2255 E Unity   : System.Action`2:Invoke(T1, T2)
    7. 09-15 10:50:56.639 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
    8. 09-15 10:50:56.639 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, Exception, Boolean)
    9. 09-15 10:50:56.639 27740  2255 E Unity   : UnityEngine.ResourceManagement.ResourceProviders.InternalOp:CompleteOperation(String, Exception)
    10. 09-15 10:50:56.639 27740  2255 E Unity   : UnityEngine.ResourceManagement.ResourceProviders.InternalOp:RequestOperation_completed(AsyncOperation)
    11. 09-15 10:50:56.639 27740  2255 E Unity   : System.Action`1:Invoke(T)
    12. 09-15 10:50:56.639 27740  2255 E Unity   : UnityEngine.AsyncOperation:InvokeCompletionEvent()
    13. 09-15 10:50:56.639 27740  2255 E Unity   :
    14. 09-15 10:50:56.640 27740  2255 E Unity   : RuntimeData is null.  Please ensure you have built the correct Player Content.
    15. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.InitalizationObjectsOperation:Execute()
    16. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    17. 09-15 10:50:56.640 27740  2255 E Unity   : System.Action`1:Invoke(T)
    18. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.<>c__DisplayClass57_0:<add_CompletedTypeless>b__0(AsyncOperationHandle`1)
    19. 09-15 10:50:56.640 27740  2255 E Unity   : System.Action`1:Invoke(T)
    20. 09-15 10:50:56.640 27740  2255 E Unity   : DelegateList`1:Invoke(T)
    21. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    22. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks()
    23. 09-15 10:50:56.640 27740  2255 E Unity   : UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    24. 09-15 10:50:56.640 27740  2255 E Unity   : System.Action`1:Invoke(T)
    25. 09-15 10:50:56.640 27740  2255 E Unity   :
    26. 09-15 10:50:56.641 27740  2255 E Unity   : OperationException : Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
    27. 09-15 10:50:56.641 27740  2255 E Unity   : System.Action`2:Invoke(T1, T2)
    28. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
    29. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, Exception, Boolean)
    30. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.AddressableAssets.Initialization.InitializationOperation:Execute()
    31. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    32. 09-15 10:50:56.641 27740  2255 E Unity   : System.Action`1:Invoke(T)
    33. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.<>c__DisplayClass57_0:<add_CompletedTypeless>b__0(AsyncOperationHandle`1)
    34. 09-15 10:50:56.641 27740  2255 E Unity   : System.Action`1:Invoke(T)
    35. 09-15 10:50:56.641 27740  2255 E Unity   : DelegateList`1:Invoke(T)
    36. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    37. 09-15 10:50:56.641 27740  2255 E Unity   : UnityEngine.ResourceManag
    In general, it would be nice to have this documented somewhere. I've spent several days now trying to figure out the official guidance.

    @pillakirsten
    @JuliusM
     
    Last edited: Sep 16, 2021
  50. Cixelyn

    Cixelyn

    Joined:
    Jun 27, 2014
    Posts:
    4
    We're also having this issue since adding PAD to our application. We filed ticket 1360559 last month but no response yet.

    Our app crashes nondeterministically on launch about 50% of time on most android phones. If you repeatedly swipe away the app and re-open, it it will eventually start.

    It seems that the unity VFS has some sort of race condition that prevents it from reading `data.unity3d` consistently

    @SinTrace are you using Unity-as-a-Library? Originally I had thought it was UaaL related, but if you're encountering the issue in a non UaaL project then it might be a pure addressables + PAD issue.

    See the relevant log snippets below.

    Code (CSharp):
    1. 08-23 21:21:37.669  4074  4227 D Unity  : Loading player data from assets/bin/Data/data.unity3d
    2. 08-23 21:21:37.669  4074  4227 E Unity  : Unable to open archive file: assets/bin/Data/data.unity3d
    3. 08-23 21:21:37.669  4074  4227 E Unity  : (Filename: ./Runtime/VirtualFileSystem/ArchiveFileSystem/ArchiveStorageReader.cpp Line: 587)
    4. 08-23 21:21:37.669  4074  4227 E Unity  :
    5. 08-23 21:21:37.669  4074  4227 D Unity  : Failed to install Player data archive: assets/bin/Data/data.unity3d!
    6. 08-23 21:21:37.669  4074  4227 D Unity  : No GlobalGameManagers file was found at assets/bin/Data, quitting player!
     
    Last edited: Sep 18, 2021
    SinTrace likes this.
unityunity