bevyengine / bevyengine/bevy

Hot Reloading does not work with texture images

Open
#8,341 5 comments 2 reactions 0 assignees View on GitHub
A-Rendering C-Bug S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

`main` branch
`0d971a63e4ff86aa416240c6684b2d7a1a4fa0c9`

## Relevant system information

MacOS Ventura 13.1, M1 MacBook

## What you did

I modified the `hot_asset_reloading` example to simulate my problem:

```diff
-fn setup(mut commands: Commands, asset_server: Res) {
- // Load our mesh:
- let scene_handle = asset_server.load("models/monkey/Monkey.gltf#Scene0");
+fn setup(
+ mut commands: Commands,
+ mut meshes: ResMut>,
+ mut materials: ResMut>,
+ asset_server: Res,
+) {
+ // Load our texture:
+ let texture_handle: Handle = asset_server.load("textures/array_texture.png");

- commands.spawn(SceneBundle {
- scene: scene_handle,
+ // plane
+ commands.spawn(PbrBundle {
+ mesh: meshes.add(Mesh::try_from(shape::Plane::from_size(10.)).unwrap()),
+ material: materials.add(StandardMaterial {
+ base_color_texture: Some(texture_handle),
+ ..default()
+ }),
```

## What went wrong

I expected the plane's material to hot reload when the texture file was changed.

## Additional information

Scene and model files hot reload as intended.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.