I am currently trying StreamingAssets with my Android build and running into issues. I am building an aab and have ‘Split Application Binary’ checked so that it generates an install-time pack (UnityDataAssetPack) and a fast-follow pack (UnityStreamingAssetsPack) that has the streaming assets. However, when I ‘Build and Run’ onto my device, I am not able to load any of the streaming assets because it tries to load it from the UnityDataAssetPack instead of UnityStreamingAssetsPack.
This is the path that it tries to load when I run on my Android device:
2023/07/05 11:16:05.165 12073 17508 Info Unity LOADING URL = jar:file:///data/app/~~[redacted]/com.[redacted]-[redacted]/split_UnityDataAssetPack.apk!/assets/Earth_Library/Earth_Library.png
In the script, I am using this to get the streaming assets path:
I opened the aab in Android Studio and it looks good, the issue is on the Unity side using the wrong paths. I also experienced a similar issue with addressables where it was always trying to load from UnityDataAssetPack instead of the custom fast-follow packs that I had configured. Is ‘Build and Run’ not expected to work and I am required to upload to Google and download there for the aab to work on my device?
Also, the size limit of fast-follow packs is 512 MB, if streaming assets exceeds 512 MB will it create multiple fast-follow packs automatically? It seemed like that wasn’t the case when I analyzed the aab in Android Studio as the UnityStreamingAssetsPack was 560MB, though with this being close to 512MB I wasn’t sure if it needed to split it yet.
Unity version: 2022.2.10