bevyengine / bevyengine/bevy

Add observers to asset server

Open
#17,431 0 comments 8 reactions 0 assignees View on GitHub
A-Assets C-Feature D-Modest S-Ready-For-Implementation
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?

With procgen I often find I need the asset itself in order to make it usable. E.g. Load a mesh and then add a boolean operator to it. Currently getting asset itself in bevy is very cumbersome.

## What solution would you like?

add `observe` method for `Handle` with common triggers like `OnLoaded`, `OnError`, etc.

## What alternative(s) have you considered?

Listening for asset loader events and check if the resource I want is the one that was just loaded. It's logically similar to the observer method proposed, but requires a lot more boilerplate.

Contributor guide

Open the contributing guide

Research direction

Start by reading the asset loader event approach described in the issue and how Handle currently exposes asset access. Define what an observe method and common triggers such as OnLoaded and OnError would need to cover; done means the proposal supports observing a specific asset without manually filtering loader events.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.