bevyengine / bevyengine/bevy

InlineAssetReader

Open
#12,581 4 comments 1 reaction 0 assignees View on GitHub
A-Assets C-Feature
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

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

An inline asset reader is one in which the data for the asset is encoded entirely within the asset path. It's similar in concept to a "data url".

The motivation is to allow runtime computed objects, such as materials, to be created on the fly and managed like assets with strong handles.

See discord thread [here](https://discord.com/channels/691052431525675048/749332104487108618/1219358538925740093).

## What solution would you like?

The `InlineAssetReader` is an asset reader that doesn't actually read anything: it just returns a zero-length byte array. It is intended to be used in conjunction with an asset loader that decodes the asset path and constructs an asset based on the information in the decoded path.

## What alternative(s) have you considered?

I considered instead having a `Base64AssetReader` that actually looks at the path and decodes it into a byte array, but doing this in the asset loader gives more flexibility.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating the asset reader and asset loader APIs, then review how asset paths are passed between them. Done means an inline reader returns a zero-length byte array while a loader can decode the asset path and construct the requested runtime asset.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.