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

Make asset_manager configurable #7029

Closed
jinleili opened this issue Dec 25, 2022 · 2 comments
Closed

Make asset_manager configurable #7029

jinleili opened this issue Dec 25, 2022 · 2 comments
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Enhancement A new feature O-Android Specific to the Android mobile operating system

Comments

@jinleili
Copy link
Contributor

What problem does this solve or what need does it fill?

Integrating the Bevy engine into an existing app may be a common scenario, but in this scenario it is difficult for the user to manually initialize the ndk-glue because the ANativeActivity parameter cannot be provided and the ndk-glue is not initialized which causes AndroidAssetIo::load_path panic.

What solution would you like?

Since ANativeActivity is only used in bevy to get asset_manager:

let asset_manager = ndk_glue::native_activity().asset_manager()

Allowing asset_manager to be made available through configuration would give users more freedom.

Additional context

Scenario demo: bevy-in-app

@jinleili jinleili added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels Dec 25, 2022
@mockersf mockersf added A-Assets Load files from disk to use for things like images, models, and sounds O-Android Specific to the Android mobile operating system and removed S-Needs-Triage This issue needs to be labelled labels Dec 25, 2022
@mockersf
Copy link
Member

ndk-glue will be removed in #6830

@jinleili
Copy link
Contributor Author

@mockersf Thank you for the link, I learned how to customize AssetIoPlugin from #6830, now solved the configuration issue of asset_manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Enhancement A new feature O-Android Specific to the Android mobile operating system
Projects
None yet
Development

No branches or pull requests

2 participants