Giter Site home page Giter Site logo

be.khepri.play.assetdelivery.addressables's People

Contributors

jelte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

be.khepri.play.assetdelivery.addressables's Issues

Compatibility with Unity Addressables 1.18.11+ plugin

I have tried multiple times to upgrade to multiple versions of Unity Addressables 1.18.11+ plugin, but they all don't work.
Can you please specify if any version of Unity Addressables 1.18.11+ plugin is supposed to work with the latest version in git?
I have no idea how to debug the problem with production code downloaded from Google Play.
Can you please tell me if you are familiar with this problem?
If you don't have time to debug it, can you please describe a possible method to debug the problem, so I would be able to do it by myself?

Retrive assets from installtime pack

I followed the instruction in README, everything went ok, aab has included the pack, but how do I 'unload it' in build?

EDIT: When i try to load it with Addressables.LoadAssetAsync() I got this exception in logcat

11-02 23:04:14.101 20492 20533 E Unity   : Exception encountered in operation Dependencies [base6_assets_all_ecfca279f78dbfc7b79f6c6b455f..., defaultlocalgroup_unitybuiltinshaders_3882323...], status=Failed, result=System.Collections.Generic.List`1[UnityEngine.R
esourceManagement.AsyncOperations.AsyncOperationHandle] : Object reference not set to an instance of an object.
11-02 23:04:14.101 20492 20533 E Unity   : UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception)

Unable to open archive file error at runtime

Unity 2020.3.481f

Builds and downloads fine, all packs set to install time.

Unable to open archive file: jar:file:///data/app/com.DivergentRealities.CardsTankards-LxA-QhlvfFvnFq7lp_Npkw==/base.apk!/assets/aa/Android/shared_assets_all_be224842896d81eb2905d5fedc727d46.bundle

So it appears to be trying to load all the asset packs from the base pack instead of the PAD directories. Any idea how to fix this?

WebRequestOperationCompleted retries on success

I have been attempting to implement a WbeRequest fallback for Asset Pack downloads and noticed an error in your WebRequestAssetBundleResourceHandlerBase.WebRequestOperationCompleted()

Current:
if (downloadHandler == null || webReq.isHttpError || !webReq.isNetworkError || string.IsNullOrEmpty(webReq.error))
My Edit:
if (downloadHandler == null || webReq.isHttpError || webReq.isNetworkError || !string.IsNullOrEmpty(webReq.error))

The current version of the Retry condition will always retry on a successful Web Request Operation as it retires if there are no Network Errors.

The 2 last conditions need to be flipped, so it only retries if there is a NetworkError or webReq.error is not null.

Error when creating config for Adressable groups.

I added adressable asset bundles to my adressable groups and built them. I get the following error every time I select 'Create config for Adressables Groups':

Screenshot_4

I used the 'Default build script' for building adressables.

My adressable groups look like this:

Screenshot_5

The asset bundle adressable settings look like this:

Screenshot_6

My guess is that I'm doing something wrong.

Invalid dependencies or related test packages during Unity Cloud Build

Hi, I am facing some invalid independencies problem when I do the unity cloud build, but no issues for local build.

Error messages :
[Unity] Package be.khepri.play.assetdelivery.addressables@https://github.com/jelte/be.khepri.play.assetdelivery.addressables.git#1.0.0-rc5 has invalid dependencies or related test packages:
79: [Unity] com.google.play.assetdelivery (dependency): Package [[email protected]] cannot be found
80: [Unity] Package [email protected] has invalid dependencies or related test packages:
81: [Unity] com.google.play.common (dependency): Package [[email protected]] cannot be found
82: [Unity] com.google.play.core (dependency): Package [[email protected]] cannot be found
83: [Unity] Package [email protected] has invalid dependencies or related test packages:
84: [Unity] com.google.android.appbundle (dependency): Package [[email protected]] cannot be found
85: [Unity] Package [email protected] has invalid dependencies or related test packages:
86: [Unity] com.google.android.appbundle (dependency): Package [[email protected]] cannot be found
87: [Unity] A re-import of the project may be required to fix the issue or a manual modification of /BUILD_PATH/xxxx/Packages/manifest.json file.

Before I import your package, I already had the GooglePlayPlugin in my project and the version is 1.4.0, is it possible to use 1.4.0 version ?

Error with new 1.0.2 version, when using Google>Create config for Addressables Groups

I have been using assetdelivery.addressables 1.0.0, Unity Addressables 1.18.9, Unity 2020.3.39f1, google play-unity-plugins 1.7.
Today I've upgrade to assetdelivery.addressables 1.0.2 version, Unity Addressables 1.19.19, Unity 2021.3.11f1.
Then I did:

  1. Addressables Groups>Clean Build>All
  2. Addressables Groups>New Build>Default Build Script
  3. Google > Create config for Addressables Groups
    Got an error: Unable to create AssetPack config. Make sure Addressables asset bundles have been build!
    In the log message: "[AssetPackBuilder.CreateAssetPacks] path="
    Do I need to configure this folder somewhere?

error while build

ArgumentException: Invalid asset pack name: videos1-10_assets_all_175c9dd4edca2410843e3d2aa5329efc
Google.Android.AppBundle.Editor.AssetPackConfig.CheckAssetPackName (System.String assetPackName) (at Library/PackageCache/[email protected]/Editor/Scripts/AssetPackConfig.cs:191)
Google.Android.AppBundle.Editor.AssetPackConfig.AddAssetsFolders (System.String assetPackName, System.Collections.Generic.IDictionary`2[TKey,TValue] compressionFormatToAssetPackDirectoryPath, Google.Android.AppBundle.Editor.AssetPackDeliveryMode deliveryMode) (at Library/PackageCache/[email protected]/Editor/Scripts/AssetPackConfig.cs:126)
Google.Android.AppBundle.Editor.Internal.Config.SerializationHelper.Deserialize (Google.Android.AppBundle.Editor.Internal.Config.SerializableAssetPackConfig config) (at Library/PackageCache/[email protected]/Editor/Scripts/Internal/Config/SerializationHelper.cs:144)
Google.Android.AppBundle.Editor.AssetPacks.AssetPackConfigSerializer.LoadConfig () (at Library/PackageCache/[email protected]/Editor/Scripts/AssetPackConfigSerializer.cs:52)
Google.Android.AppBundle.Editor.Internal.BuildAndRunner.BuildAndRunDefault () (at Library/PackageCache/[email protected]/Editor/Scripts/Internal/BuildAndRunner.cs:62)
Google.Android.AppBundle.Editor.Internal.BuildAndRunner.BuildAndRun () (at Library/PackageCache/[email protected]/Editor/Scripts/Internal/BuildAndRunner.cs:53)
Google.Android.AppBundle.Editor.Internal.AppBundleEditorMenu.BuildAndRun () (at Library/PackageCache/[email protected]/Editor/Scripts/Internal/AppBundleEditorMenu.cs:72)

Error upon adding package

When I add the package i get the following error:

Library\PackageCache\be.khepri.play.assetdelivery.addressables@8ec2fd1\Runtime\ResourceHandlers\WebRequestAssetBundleResourceHandlerBase.cs(41,42): error CS0103: The name 'options' does not exist in the current context

I'm using Unity 2018.4,12f1 and adressables version 1.8.5..

Error Unity InvalidOperationException: GetResult called after operation failed with error: BundleUnavailable

2022/08/03 09:22:42.762 20513 20737 Error PlayCore UID: [10578]  PID: [20513] AssetPackServiceImpl : onError(-2)
2022/08/03 09:22:42.797 20513 20564 Error Unity InvalidOperationException: GetResult called after operation failed with error: BundleUnavailable
2022/08/03 09:22:42.797 20513 20564 Error Unity   at Google.Play.Common.PlayAsyncOperation`2[TResult,TError].GetResult () [0x00000] in <00000000000000000000000000000000>:0 
2022/08/03 09:22:42.797 20513 20564 Error Unity   at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation+<>c.<OnGetPackDownloadSize>b__21_2 (Google.Play.Common.PlayAsyncOperation`2[TResult,TError] operation) [0x00000] in <00000000000000000000000000000000>:0 
2022/08/03 09:22:42.797 20513 20564 Error Unity   at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
2022/08/03 09:22:42.797 20513 20564 Error Unity   at System.Linq.Enumerable.Sum (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <00000000000000000000000000000000>:0 
2022/08/03 09:22:42.797 20513 20564 Error Unity   at System.Linq.Enumerable.Sum[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00000] in <00000000000000000000000000000000>:0 
2022/08/03 09:22:42.797 20513 20564 Error Unity   at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation.OnGetPackDownloadSize (Google.Play.Common.PlayAsyncOperation`2[TResul

Always kept ecounter this error when enabled the Google/Asset Delivery/Separate base apk asset
any clue about this ?

is this related by addressable group settings ?
mine was looks like this :
image

thanks for the reply.

Delivery mode: 'Do not package' is not included in build

If you choose delivery mode Do not package, then this asset group won't be included into build, nor as part of base.apk, nor as part of any other bundle. Doesn't matter if building from script or by menu item.

Unity 2019.4.12f1
Google Asset Delivery plugins 1.3.0
be.khepri.playassetdelivery.addressables 1.0.0rc4

Size of AAB

Hi! I first time use google asset delivery. And I have one question.
I created some builds:

  1. I build .aab via standart build menu with "local build path" in all addressables group settings(without your asset). Size of aab ~450Mb.
  2. I build .aab via standart build menu with "remote build path" in all addressables group settings(without your asset). Size of aab ~35Mb.
  3. I build .aab via google menu with "local build path" and added "Play Asset Delivery Schema"(Install Time) for all addressables group settings. Size of aab ~450Mb.

I try to upload build โ„–3 to google play console(inner testing) and take error "The App Bundle contains configurations where the installation file is larger than the size limit (150MB): ARM64_V8A." What I do wrong? When I build via google menu I must get 1 file or 2(main + packed assets)?

Encounter error when trying to build in batch mode, work fine in Editor

21:23:52 Khepri.PlayAssetDelivery.Editor.AssetPackBuilder:BuildBundleWithAssetPacks (UnityEditor.BuildPlayerOptions,UnityEditor.MobileTextureSubtarget,string) (at Library/PackageCache/be.khepri.play.assetdelivery.addressables@69dccaaacf/Editor/AssetPackBuilder.cs:76)
21:23:52 Jenkins:BuildForPlatform (string,UnityEditor.BuildTarget,string,string,string,string) (at Assets/Scripts/General/Editor/Jenkins.cs:991)
21:23:52 Jenkins:BuildForPlatformAndroid () (at Assets/Scripts/General/Editor/Jenkins.cs:922)
21:23:52
21:23:52 (Filename: Library/PackageCache/[email protected]/Editor/Scripts/Internal/BuildTools/BuildToolLogger.cs Line: 61)
21:23:52
21:23:52 Cancelling DisplayDialog: Build Error Build failed with 2 error(s)
21:23:52 This should not be called in batch mode.

Compile error, ambiguous reference

Library/PackageCache/be.khepri.play.assetdelivery.addressables@ccb2d9eafe/Editor/AssetPackBuilder.cs(40,53): error CS0104: 'TextureCompressionFormat' is an ambiguous reference between 'Google.Android.AppBundle.Editor.TextureCompressionFormat' and 'UnityEditor.TextureCompressionFormat'

Library/PackageCache/be.khepri.play.assetdelivery.addressables@ccb2d9eafe/Editor/Settings/GroupSchemas/AssetPackGroupSchema.cs(19,57): error CS0104: 'TextureCompressionFormat' is an ambiguous reference between 'Google.Android.AppBundle.Editor.TextureCompressionFormat' and 'UnityEditor.TextureCompressionFormat'

Library/PackageCache/be.khepri.play.assetdelivery.addressables@ccb2d9eafe/Editor/AssetPackBuilder.cs(104,90): error CS0104: 'TextureCompressionFormat' is an ambiguous reference between 'Google.Android.AppBundle.Editor.TextureCompressionFormat' and 'UnityEditor.TextureCompressionFormat'

Library/PackageCache/be.khepri.play.assetdelivery.addressables@ccb2d9eafe/Editor/AssetPackBuilder.cs(83,20): error CS0104: 'TextureCompressionFormat' is an ambiguous reference between 'Google.Android.AppBundle.Editor.TextureCompressionFormat' and 'UnityEditor.TextureCompressionFormat'

Occured on Unity version 2023.2.3f1

Fail to create config for Addressables Groups

Hello, I just follow the instruction to set up the addressables asset for play asset delivery. Add scheme to all of the addressables groups. Rebuild the addressables assets. And then try to create config for addressables groups. But I get error saying that could no find a part of the path.

image

The file that showed in the path exists but the path having both slash and backslash. Don't don't whether it is related.
My Unity version is 2019.4.21f1.

Invalid asset pack name

After pressing the "Build Android App Bundle..." button from the "Google" Tab, the Invalid assets pack occured.

ArgumentException: Invalid asset pack name: unit-101_assets_all_e81e44ff5cf50c1d5426228b2439b20f
Google.Android.AppBundle.Editor.AssetPackConfig.CheckAssetPackName (System.String assetPackName) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/AssetPackConfig.cs:213)
Google.Android.AppBundle.Editor.AssetPackConfig.AddAssetsFolders (System.String assetPackName, System.Collections.Generic.IDictionary`2[TKey,TValue] compressionFormatToAssetPackDirectoryPath, Google.Android.AppBundle.Editor.AssetPackDeliveryMode deliveryMode) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/AssetPackConfig.cs:146)
Google.Android.AppBundle.Editor.Internal.Config.SerializationHelper.Deserialize (Google.Android.AppBundle.Editor.Internal.Config.SerializableAssetPackConfig config) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/Config/SerializationHelper.cs:199)
Google.Android.AppBundle.Editor.AssetPacks.AssetPackConfigSerializer.LoadConfig () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/AssetPackConfigSerializer.cs:52)
Google.Android.AppBundle.Editor.Internal.AppBundlePublisher.Build () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundlePublisher.cs:134)
Google.Android.AppBundle.Editor.Internal.AppBundleEditorMenu.BuildAndroidAppBundle () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/AppBundleEditorMenu.cs:66)

Mentioned in #30 by webrosmelvin also, but the issue was closed.

AssetModuleException, Blcack screen

Unity Version: 2020.3.20f
Google Unity Plugin Version: 1.7.0
play.assetDelivery.addressables Version: 1.0.0

Link the plugin, it will be uploaded to Google Play well even if it exceeds 150mb.
However, when I run the game, I get the following error.
How to solve this error?

2022-04-26 12:33:08.881 8543-8840/? E/PlayCore: UID: [10297]  PID: [8543] AssetPackServiceImpl : onError(-2)
2022-04-26 12:33:08.890 1266-8909/? E/Finsky: [43160] fla.accept(75): Request execution failed with error code: -2
    com.google.android.finsky.assetmoduleserviceutils.AssetModuleException: Request to PGS failed because all packs are unavailable.
        at eqi.Xv(PG:54)
        at euq.l(PG:7)
        at duy.run(PG:5)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8167)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

android runtime assetbundle path error

image
i build my aab and use bundletool to install the app on my simulator, it seems to find the bundle in the base.apk while i know that the bundle should be in the split asset apk. whats wrong with that? any suggestion?

All asset bundles also in base_assets when using Unity 2021

We make use of this plugin for quite a while now which always worked flawlessly since Unity 2019. But after upgrading to Unity 2021.3.5f1 the final AAB is almost double size, after investigating it looks like all assets bundles are also part of base_asset (base_assets/assets/aa has all asset bundles too, which was not the case in earlier versions).

Is this maybe a known issue already? Does anyone have a hint where to look at? (maybe Unity 2021 is building the addressables again when building the player?)

We are using Addressables 1.19.19 and play-asset-delivery 1.7.0 (worked fine with Unity 2020)

Package fails to ignore iOS project

Hello.

I have an Unity project for both Android and iOS. The package tries to run the code even if I build addressable asset in iOS platform. But Google hides the code when the platform is not in Android. The package failed to run and thus addressable asset cannot be built.

image

Is there any solution rather than comment out the scripts one by one in my iOS side project?

Bundle with materials causing exception on load or size check

I'm using the same code for addressable groups containing prefabs, audio files, and materials. Everything is working fine when I download or check the size for addressable groups that contain only prefabs and audio files, but groups that contain materials causing the exception below.
I guess that Unity creating in the background some asset bundle for built-in shaders, that is not being packed or configured properly by the tool, so it is causing exceptions when checking for dependencies for materials.
Any suggestion on how to fix this problem?
It looks like the same problem from #9.
Using: Unity 2020.1.17f1; Addressable package 1.16.16; Google Play Asset Delivery 1.3.1; Google Play Asset Delivery - Addressables 1.0.0-rc4.

 03-16 13:59:46.296  E  [19701/19723] Unity    Exception encountered in operation CompletedOperation, status=Failed, result= : Exception of type 'UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException' was thrown., ProviderId=UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider, Location=jar:file:///data/app/com.my_comp.app1-Uj427D5iLUvNGVtFxabRng==/base.apk!/assets/aa/Android/defaultlocalgroup_unitybuiltinshaders_2c39d3cc03dbf5ec7a97c7057e574b46.bundle
 03-16 13:59:46.313  E  [19701/19723] Unity    Exception encountered in operation Dependencies [materials_assets_all_8c85e60a27..., ], status=Failed, result=System.Collections.Generic.List`1[UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle] : Exception of type 'UnityEngine.ResourceManagement.Exceptions.UnknownResourceProviderException' was thrown., ProviderId=UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider, Location=jar:file:///data/app/com.my_comp.app1-Uj427D5iLUvNGVtFxabRng==/base.apk!/assets/aa/Android/defaultlocalgroup_unitybuiltinshaders_2c39d3cc03dbf5ec7a97c7057e574b46.bundle
 03-16 13:59:46.317  E  [19701/19723] Unity    Exception encountered in operation Resource<Object>(mat_03.mat), status=Failed, result= : Dependency Exception

Unity 2022.3 bug

Who working with unity 2022, please help! After upgrade from 2021 to 2022, PAD not working, Release note says: The default minimum version of Google Play Library for Asset Delivery has been upgraded to 2.0.0 with Unity built-in support. https://unity.com/releases/editor/whats-new/2022.2.12
After upgrade GP plugins android build running without crashes, but can't load any bundle with error:
Unable to open archive file: jar:file:///data/app/~~tIaTEm6kpHrV6Wod3ljE_A==/YOy0S8nqV6fDWuwkJKqPCQ==/base.apk!/assets/aa/Android/duplicateassetisolation_assets_all_974cb341ec16d02852979460087b03ef.bundle
Looks like, client tried to download bundle from base_module. But this group located in asset pack.

Error downloading error pack at unfocus

Hey

I've been testing this package in my project, roughly, without any problems.
The only problem I have is some errors while downloading the assets, unfocus the game. After focusing again, the game freezes as well.
Now, I do not know if there is something that can be done in this package or if I have to handle unfocus/focus in my project.

All I do is load a scene with "Addressables.LoadSceneAsync," which downloads the dependencies using the package.

I'm using version 1.0.3 of the package with Addressable 1.20.5 in Unity 2020.3.26f1.

10-31 09:19:10.654: I/Unity(17018): onPause
10-31 09:19:10.773: I/Unity(17018): windowFocusChanged: false
10-31 09:19:11.269: D/Unity(17018): PersistentUnitySurface.preserveContent: android.view.SurfaceView{72bcd33 VFE...... .F....I. 0,0-1920,1200 #7f05005a app:id/unitySurfaceView}
10-31 09:19:11.269: D/Unity(17018): Last resumed Activity is the Unity activity, no need to preserve SurfaceView content
10-31 09:19:11.270: D/Unity(17018): SetWindow 0 0x0
10-31 09:19:12.139: D/Unity(17018): onActivityResumed: com.unity3d.player.UnityPlayerActivity@ff78b57
10-31 09:19:12.149: I/Unity(17018): onResume
10-31 09:19:12.212: D/Unity(17018): SetWindow 0 0x7894f61010
10-31 09:19:12.212: D/Unity(17018): SetWindow 0 0x7894f61010
10-31 09:19:12.246: I/Unity(17018): windowFocusChanged: true
10-31 09:19:12.252: D/Unity(17018): [EGL] Attaching window :0x7894f61010
10-31 09:19:12.289: D/Unity(17018): ANativeWindow: (1920/1200) RequestedResolution: (0/0) RenderingResolution: (0/0) EGLSurface: (1920/1200)
10-31 09:19:12.341: D/Unity(17018): Choreographer available: Enabling VSYNC timing
10-31 09:19:12.613: E/Unity(17018): Failed to retrieve asset pack: Asset Pack Download Error(-7): Download not permitted under current device circumstances (e.g. in background). (https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackErrorCode.html#ACCESS_DENIED)
10-31 09:19:12.613: E/Unity(17018): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
10-31 09:19:12.613: E/Unity(17018): UnityEngine.Logger:LogFormat(LogType, String, Object[])
10-31 09:19:12.613: E/Unity(17018): UnityEngine.Debug:LogErrorFormat(String, Object[])
10-31 09:19:12.613: E/Unity(17018): Google.Play.AssetDelivery.Internal.<>c__DisplayClass20_1:<StartRequest>b__1(String, Int32)
10-31 09:19:12.613: E/Unity(17018): Google.Play.Core.Internal.<>c__DisplayClass4_0:<onFailure>b__0()
10-31 09:19:12.613: E/Unity(17018): Google.Play.Core.Internal.PlayCoreEventHandler:Update()
10-31 09:19:12.615: E/Unity(17018): System.Exception: Error downloading error pack: AccessDenied
10-31 09:19:12.615: E/Unity(17018): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
10-31 09:19:12.615: E/Unity(17018): UnityEngine.Logger:Log(LogType, Object)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.Debug:LogError(Object)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(Object, Boolean, Exception, Boolean)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1:ProviderCompleted(ModularAssetBundleResource, Boolean, Exception)
10-31 09:19:12.615: E/Unity(17018): UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle:Complete(ModularAssetBundleResource, Boolean, Exception)
10-31 09:19:12.615: E/Unity(17018): Khepri.AssetDelivery.ModularAssetBundleResource:OnCompleted(IAssetBundleResourceHandler, AssetBundle, Exception)
10-31 09:19:12.615: E/Unity(17018): Khepri.AssetDelivery.ResourceHandlers.AssetBundleResourceHandlerBase:CompleteOperation(IAssetBundleResourceHandler, String)

Bundle is included with installation instead of "Fast Follow"

I created Addressable Group with audio files that take around 50MB. I want to be able to use Play Asset Delivery, with delivery mode "Fast Follow", so the bundle would be downloaded only after the app itself is installed.
I followed your instruction for installation and configuration. I've added the scheme "Fast Follow" to Addressable Group, then I followed the 3 steps for the manual build process.
Now I have 2 problems:

  1. The aab file is created, but it fails to sign it with error: "Signing failed: Failed to locate keystore file: mykeystore.keystore". I'm sure that my settings are fine in Unity Project Settings, regarding keystore file, pass, alias and alias password. For now, I just used apksigner to add my signature to the aab. Maybe you have any idea what might be the problem there.
  2. I uploaded the aab file to the internal test in Google Play Store. When I'm downloading the app, because of the size, I can tell right away that the whole 50MB bundle is included in the installation, and not separated into a bundle, as I hoped. Any suggestion what possibly went wrong?

Thanks!

Exception in OnGetPackDownloadSize

I've noticing quit a lot exceptions related to OnGetPackDownloadSize in Firebase crash log, attaching below a few of stack traces.
@jelte Can you please look at it?
Is it just a problem with OnGetPackDownloadSize that the line "Complete(AsyncOperationStatus.Failed..." should be followed with a "return;"?

Non-fatal Exception: java.lang.Exception: InvalidOperationException : GetResult called after operation failed with error: NetworkError
       at Google.Play.Common.PlayAsyncOperation`2[TResult,TError].GetResult(Google.Play.Common.PlayAsyncOperation`2[TResult,TError])
       at System.Func`2[T,TResult].Invoke(System.Func`2[T,TResult])
       at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext(System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult])
       at System.Linq.Enumerable.Sum(System.Linq.Enumerable)
       at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation.OnGetPackDownloadSize(Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation)
       at System.Action`1[T].Invoke(System.Action`1[T])
       at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0.<GetDownloadSizeInternal>b__1(Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0)
       at System.Action`2[T1,T2].Invoke(System.Action`2[T1,T2])
       at System.Action.Invoke(System.Action)
       at Google.Play.Core.Internal.PlayCoreEventHandler.Update(Google.Play.Core.Internal.PlayCoreEventHandler)
Non-fatal Exception: java.lang.Exception: InvalidOperationException : GetResult called after operation failed with error: AccessDenied
       at Google.Play.Common.PlayAsyncOperation`2[TResult,TError].GetResult(Google.Play.Common.PlayAsyncOperation`2[TResult,TError])
       at System.Func`2[T,TResult].Invoke(System.Func`2[T,TResult])
       at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext(System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult])
       at System.Linq.Enumerable.Sum(System.Linq.Enumerable)
       at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation.OnGetPackDownloadSize(Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation)
       at System.Action`1[T].Invoke(System.Action`1[T])
       at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0.<GetDownloadSizeInternal>b__1(Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0)
       at System.Action`2[T1,T2].Invoke(System.Action`2[T1,T2])
       at System.Action.Invoke(System.Action)
       at Google.Play.Core.Internal.PlayCoreEventHandler.Update(Google.Play.Core.Internal.PlayCoreEventHandler)
Non-fatal Exception: java.lang.Exception: InvalidOperationException : GetResult called after operation failed with error: InternalError
       at Google.Play.Common.PlayAsyncOperation`2[TResult,TError].GetResult(Google.Play.Common.PlayAsyncOperation`2[TResult,TError])
       at System.Func`2[T,TResult].Invoke(System.Func`2[T,TResult])
       at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext(System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult])
       at System.Linq.Enumerable.Sum(System.Linq.Enumerable)
       at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation.OnGetPackDownloadSize(Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation)
       at System.Action`1[T].Invoke(System.Action`1[T])
       at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0.<GetDownloadSizeInternal>b__1(Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal+<>c__DisplayClass10_0)
       at System.Action`2[T1,T2].Invoke(System.Action`2[T1,T2])
       at System.Action.Invoke(System.Action)
       at Google.Play.Core.Internal.PlayCoreEventHandler.Update(Google.Play.Core.Internal.PlayCoreEventHandler)

Support for addressables build in external project

Current implementation assumes that addressables are build in the same project. However this is not always the case.

Changes:

  • use configurable path instead of fixed Addressable.BuildPath to determine where the source assets are located.
  • Export Asset Pack configuration to a settings file
  • Use settings file when generating Asset Packs
  • Copy files from configurable path to Addressables.runtimePath

Issues with generating Asset Packs and Building

  1. Bundles for the addressables are generated in Library\com.unity.addressables\StreamingAssetsCopy\aa\Android\Android, but the plugin only looks for bundles in Library\com.unity.addressables\StreamingAssetsCopy\aa\Android, (note the missing Android directory at the end), which is why there are no packs being generated.

  2. This is mentioned somewhere else, but the Build App Bundle isn't working. Somehow the Google Play PAD plugin still using the bundle name with the ".bundle" extension at the end, which is not a valid asset pack name.

Compile Error, extension method 'TotalBytesToDownloaded' not found

Assets\Plugins\play.assetdelivery.addressables\Runtime\ResourceHandlers\AssetPackAssetBundleResourceHandlerBase.cs(19,72): error CS1061: 'PlayAssetPackRequest' does not contain a definition for 'TotalBytesToDownloaded' and no accessible extension method 'TotalBytesToDownloaded' accepting a first argument of type 'PlayAssetPackRequest' could be found (are you missing a using directive or an assembly reference?)
Assets\Plugins\play.assetdelivery.addressables\Runtime\ResourceHandlers\AssetPackAssetBundleResourceHandlerBase.cs(47,61): error CS1061: 'PlayAssetPackRequest' does not contain a definition for 'BytesDownloaded' and no accessible extension method 'BytesDownloaded' accepting a first argument of type 'PlayAssetPackRequest' could be found (are you missing a using directive or an assembly reference?)

be.khepri.play.assetdelivery.addressables : 1.0.0-rc4
Google PAD version 1.8.2 (2023 - 03 - 10)

Not all groups were created correctly by Create config for Addressable Groups

In my project there are 4 groups: Campaign, Background, Preview, and Custom Game. Addressable is used to create the campaign_assets_all.bundle, background_assets_all.bundle, preview_assets_all.bundle, and customgame_assets_all.bundle. The Custom Game bundle is created without the underscore (custom_game). And when I create groups from the menu Google -> Create config for Addressable Groups, 3 directories are created: campaign_assets_all, background_assets_all, preview_assets_all in the \Library\be directory.khepri.play\StreamingAssetsCopy. But the directory for Custom Game is not created.

Apparently, the problem is in the search, in the AssetPackBuilder.GetAssetPackGroupSchema(string bundle) method (.Where(group => Path.GetFileName(bundle).StartsWith(group.Name.ToLower()))). In my case, I changed the name of the Custom Game group to CustomGame (without underscore) in Addressables, and after that all 4 directories were created in \Library\be.khepri.play\StreamingAssetsCopy

Unity 2020.1.4f, Addressables Package 1.16.10, tested on Google Play Asset Delivery - Addressables Version 1.0.0-rc3

NRE: Can't build addressables in Groups menu

Upon clicking on the Build dropdown, am encountered with an NRE:

NullReferenceException: Object reference not set to an instance of an object UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.TopToolbar (UnityEngine.Rect toolbarPos) (at Library/PackageCache/[email protected]/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:256) UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnGUI (UnityEngine.Rect pos) (at Library/PackageCache/[email protected]/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:446) UnityEditor.AddressableAssets.GUI.AddressableAssetsWindow.OnGUI () (at Library/PackageCache/[email protected]/Editor/GUI/AddressableAssetsWindow.cs:159) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <208f92fc783546f9abbe643bfc23920c>:0) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <208f92fc783546f9abbe643bfc23920c>:0) UnityEditor.DockArea.OldOnGUI () (at <208f92fc783546f9abbe643bfc23920c>:0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.OpenGate () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <00a477ed1abf4030be646c3244bd3667>:0)

Problems with Version 1.0.3 with addressables 1.18.19 and Unity 2020.3.39f1.

I have upgraded to the latest version 1.0.3, it is working fine with Unity addressables 1.18.9 and Unity 2020.3.39f1.
But when I upgraded to Unity addressables 1.18.19, suddenly the installation size increased from 100Mb to ~155MB. I have looked with google bundle explorer, and both versions look the same in the delivery, Base is 73 MB and On demand asset is 25 MB. Is it possible that it is related to issue #62?
Another problem, when I moved to 1.18.19, it didn't work, there was an exception on an attempt of asset download. Maybe I have something misconfigured in my folder, possibly wrong path - something similar to issue #63?
Thanks @jelte

Unity InvalidOperationException: GetResult called after operation failed with error: AppUnavailable

Getting this error for getting download size on Build Android

2022/07/29 17:33:42.959 15466 15520 Error Unity InvalidOperationException: GetResult called after operation failed with error: AppUnavailable
2022/07/29 17:33:42.959 15466 15520 Error Unity   at Google.Play.Common.PlayAsyncOperation`2[TResult,TError].GetResult () [0x00000] in <00000000000000000000000000000000>:0 
2022/07/29 17:33:42.959 15466 15520 Error Unity   at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation+<>c.<OnGetPackDownloadSize>b__21_2 (Google.Play.Common.PlayAsyncOperation`2[TResult,TError] operation) [0x00000] in <00000000000000000000000000000000>:0 
2022/07/29 17:33:42.959 15466 15520 Error Unity   at System.Linq.Enumerable+WhereSelectListIterator`2[TSource,TResult].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
2022/07/29 17:33:42.959 15466 15520 Error Unity   at System.Linq.Enumerable.Sum (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <00000000000000000000000000000000>:0 
2022/07/29 17:33:42.959 15466 15520 Error Unity   at System.Linq.Enumerable.Sum[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00000] in <00000000000000000000000000000000>:0 
2022/07/29 17:33:42.959 15466 15520 Error Unity   at Khepri.AssetDelivery.Operations.DownloadSizeAsyncOperation.OnGetPackDownloadSize (Google.Play.Common.PlayAsyncOperation`2[TResult,T
2022/07/29 17:33:42.976 15466 15520 Error Unity Failed to load asset bundle Magnum : Failed to retrieve pending assetPack size AppUnavailable
2022/07/29 17:33:42.976 15466 15520 Error Unity wangan.<<CheckCachedAsset>g__LoadAssetBundle|13_0>d:MoveNext()
2022/07/29 17:33:42.976 15466 15520 Error Unity UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
2022/07/29 17:33:42.976 15466 15520 Error Unity 

Run as expected on editor. but kept ecounter this error on android build. please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.