Skip to content

Fix error in scene example#17799

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
rparrett:fix-scene-example-2
Feb 11, 2025
Merged

Fix error in scene example#17799
alice-i-cecile merged 2 commits intobevyengine:mainfrom
rparrett:fix-scene-example-2

Conversation

@rparrett
Copy link
Copy Markdown
Contributor

@rparrett rparrett commented Feb 11, 2025

Objective

After #16894, this example started logging errors:

ERROR bevy_asset::server: Failed to load asset 'scenes/load_scene_example.scn.ron' with asset loader 'bevy_scene::scene_loader::SceneLoader': Could not parse RON: 10:33: Expected string

Fixes #17798, this is the only actionable/unreported issue in there as far as I can tell.

Solution

Update the serialized scene with the expected format for Name

Testing

cargo run --example scene

Discussion

This example breaks very often and we don't always catch it. It might be nice to have this scene either

  1. produce visual output so that it can be checked
  2. panic if the scene fails to load (check for LoadState::Failed)

Either of those would make the failures visible in the example report. Not sure which method would best suit the example.

@rparrett rparrett added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy C-Examples An addition or correction to our examples A-Scenes Composing and serializing ECS objects S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 11, 2025
hash: 17588334858059901562,
name: "joe",
),
"bevy_ecs::name::Name": "name",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use a name that is not "name", just to avoid confusion? 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, nice catch!

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 11, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 11, 2025
@mockersf
Copy link
Copy Markdown
Member

This example breaks very often and we don't always catch it. It might be nice to have this scene either

  1. produce visual output so that it can be checked
  2. panic if the scene fails to load (check for LoadState::Failed)

Either of those would make the failures visible in the example report. Not sure which method would best suit the example.

option 2 for me!

Merged via the queue into bevyengine:main with commit fe7a29e Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Scenes Composing and serializing ECS objects C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

some examples don't work

3 participants