Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset bundles in subfolders cause errors in play delivery #30

Open
Ender-w opened this issue Jul 16, 2020 · 5 comments
Open

Asset bundles in subfolders cause errors in play delivery #30

Ender-w opened this issue Jul 16, 2020 · 5 comments
Assignees

Comments

@Ender-w
Copy link

Ender-w commented Jul 16, 2020

When creating asset bundles the main method of organisation is to split bundles into folders based on the asset bundle names.
For example: "subfolder/bundle1".
When trying to add this bundle to the asset delivery configuration it gives the error "An Asset bundle file with this name is missing from the folder"
As far as i can see it looks like only asset bundles in the root asset bundle directory is supported which seems wrong.
image

Unless I'm missing something it seems like its just not supported.
Asset bundles in subfolders should be supported to be included in asset delivery packages.

@thanwah
Copy link
Contributor

thanwah commented Jul 21, 2020

Thanks @Ender-w for filing this issue.

Our original API has had the restriction that asset packs are mapped 1-to-1 with AssetBundles. We have a new API where asset packs can contain arbitrary files, e.g. multiple AssetBundles in folders. In this case though the mapping of files to asset packs is entirely up to the developer. Do you think that managing the mapping yourself would work?

If not, I can take a look at what it would take to support subfolders.

@Ender-w
Copy link
Author

Ender-w commented Jul 22, 2020

Thanks for that, I've managed to map the folders using the new API.

One question I have now though is how do I do a build & run to test the app? Since the existing build and run button uses the default AssetPackConfig defined in the UI, whereas i need to be able to pass in my custom AssetPackConfig.

Im able to build my AAB using Bundletool.BuildBundle but i cant test with this it seems.

@jamcohen
Copy link
Collaborator

jamcohen commented Jul 22, 2020

To overwrite the asset pack config file used during Build and Run, you can call:

AssetPackConfigSerializer.SaveConfig(yourCustomAssetPackConfig, "Library/PlayInstantBuildConfiguration.json")`

We're looking into clearer ways to support this (i.e. specify a custom json file in the Asset Delivery Settings window), but for now this should let you Build and Run with your custom config.

@samwild2668
Copy link

When creating asset bundles the main method of organisation is to split bundles into folders based on the asset bundle names.
For example: "subfolder/bundle1".
When trying to add this bundle to the asset delivery configuration it gives the error "An Asset bundle file with this name is missing from the folder"
As far as i can see it looks like only asset bundles in the root asset bundle directory is supported which seems wrong.
image

Unless I'm missing something it seems like its just not supported.
Asset bundles in subfolders should be supported to be included in asset delivery packages.

I have the same problem. I don’t know how to deal with the problem of subfolders. I hope you can tell me, thank you!

@samwild2668
Copy link

Thanks @Ender-w for filing this issue.

Our original API has had the restriction that asset packs are mapped 1-to-1 with AssetBundles. We have a new API where asset packs can contain arbitrary files, e.g. multiple AssetBundles in folders. In this case though the mapping of files to asset packs is entirely up to the developer. Do you think that managing the mapping yourself would work?

If not, I can take a look at what it would take to support subfolders.

I have the same problem. I don’t know how to deal with the problem of subfolders. I hope you can tell me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants