Skip to content

Nested subasset loads tries to return the root nested asset. #18291

@andriyDev

Description

@andriyDev

Bevy version

ab0e3f8


In an asset loader, do a nested immediate asset load where the path you provide is a subasset:

// This returns a type mismatch error since Gltf (the type of `some_asset.gltf`) does not match `Mesh`.
load_context.loader().immediate().load<Mesh>("some_asset.gltf#Mesh0/Primitive0").await;

This means if the type of a subasset matched the root asset, we would unknowingly be using the wrong asset!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-BugAn unexpected or incorrect behaviorS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions