bevyengine / bevyengine/bevy

Sprites do not work with images after get_mut

Open
#17,854 5 comments 0 reactions 0 assignees View on GitHub
A-Assets A-Rendering C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

0.15

## What you did

I used `Assets::get_mut` to get a mutable reference to an image.

## What went wrong

I expected the resized image to be rendered to the screen. Instead, the image just disappears and doesn't get rendered to the screen.

## Additional information

This might be happening because the asset is being flagged as `Modified` when you get a mutable reference to it and the one of the sprite systems removes all images that are flagged as `Modified`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Bevy 0.15 by mutating an image through Assets::get_mut and observing sprite rendering. Trace how modified image assets are handled by the sprite systems; done means a resized image obtained this way remains rendered on screen.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
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.