Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be some kind of error for spawning a scene handle without a SceneBundle. #13313

Open
mintlu8 opened this issue May 10, 2024 · 3 comments
Labels
A-Scenes Serialized ECS data stored on the disk C-Usability A simple quality-of-life change that makes Bevy easier to use S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@mintlu8
Copy link
Contributor

mintlu8 commented May 10, 2024

What problem does this solve or what need does it fill?

This is very confusing because this "successes" in release mode and spawns the mesh in a broken state without transforms. On debug mode there are hierarchy errors regarding transform and visibility, but not present in release mode.

What solution would you like?

Log an explicit error for trying to spawn a scene without a Transform or Visibility component, even in release mode.

What alternative(s) have you considered?

Keep things as is.

@mintlu8 mintlu8 added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels May 10, 2024
@alice-i-cecile alice-i-cecile added C-Usability A simple quality-of-life change that makes Bevy easier to use A-Scenes Serialized ECS data stored on the disk S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels May 13, 2024
@alice-i-cecile
Copy link
Member

#1481 would present one possible solution to this problem.

A second query checking for this in the scene spawning system would work fine, but I'm not sold that this should be present in release. And in debug mode only, there's no additional benefit.

@mintlu8
Copy link
Contributor Author

mintlu8 commented May 14, 2024

I think this still warrants a standalone warning since

  • spawning other things like sprite or text without incorrectly will not display anything at all, which gives clear indication of an error occurring.
  • it's a cheap check done once on a relatively expensive operation (spawning a scene)

I'm not sure how if or how we support release mode debugging so I won't comment on that.

@alice-i-cecile
Copy link
Member

it's a cheap check done once on a relatively expensive operation (spawning a scene)

This is compelling! If we can figure out how to: a) not meaningfully slow down the happy path and b) ensure that we don't get spurious warnings when users are using scenes for non-spatial objects (think a preferences entity or something) I'm on board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Scenes Serialized ECS data stored on the disk C-Usability A simple quality-of-life change that makes Bevy easier to use S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

2 participants