Skip to content

Loading assets is ambiguous between the source asset and the processed asset. #21269

@andriyDev

Description

@andriyDev

Imagine an asset in your assets directory at path my_thingy.sphere.

struct SphereAsset {
    radius: f32
}

We also create an asset processor to convert this SphereAsset into a Mesh. Now consider we have two assets that want to load this asset:

struct BooleanOperator {
    sphere1: Handle<SphereAsset>,
    sphere2: Handle<SphereAsset>,
}

struct Collider {
    mesh: Handle<Mesh>,
}

Inside the loader of these, they will both try to load "my_thingy.sphere", except with different types! One of these is not valid, and will fail when loading (even during processing).

This is even worse with one-to-many asset processing, where the original path may no longer even exist (since the one asset may have been broken into several pieces).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsC-RefinementImproves output quality, without fixing a clear bug or adding new functionality.D-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-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