Skip to content

Make asset_manager configurable #7029

@jinleili

Description

@jinleili

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-FeatureA new feature, making something new possibleO-AndroidSpecific to the Android mobile operating system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions