bevyengine / bevyengine/bevy

Scene Serialization dropping Sprite Component

Open
#3,746 6 comments 1 reaction 0 assignees View on GitHub
A-Scenes C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.6.0

## Operating system & version

Ubuntu 20.04

## What you did

I tried to use the scene.rs example code to serialize and load a scene which had entities with the Sprite component. On load (after calling world.clear_entities) the Sprite component was missing off of the entity and the Image Handle was missing its reference.

## What you expected to happen

Saving and loading the scene should result in no change

## What actually happened

The sprite becomes invisible as its component is missing

## Additional information

Here is a repo showing the bug (saving is mapped to P and loading is mapped to L on the keyboard), loading multiple times seems to make the image handle find the image on alternating loads.

https://github.com/mwbryant/weird_loading_bug

This also happens with TextureAtlasSprite and when using binary serialization techniques.

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.