-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
order of commands.with(...) matters #1120
Comments
Anything that uses We could consider adopting a "typed builder" pattern to only allow the correct call pattern, but this has implications for ergonomics because it requires the typed builder to "terminate" (which would mean adding a I'll leave this open for a bit in case anyone wants to respond, but I consider this to be the "expected / desirable" behavior. |
We could add a more meaningful panic message though, suggesting what to do. |
Good call! |
Current message is Maybe |
though there are some more places where a method expects an existing entity... my vote: carts mentioned "typed builder" - pattern. i wouldn't mind adding a .finish() method to those candidates On the other hand the panic msg is quite ok. together with the stack trace myself as a beginner was able to locate the issue. |
This panic is a small price to pay for not having to use Like you mentioned, panic explains what you need to do, and in a moment it will be habit. |
yes, i think we can close this. current behaviour is ok |
Bevy version
0.4
The release number or commit hash of the version you're using.
master 3b2c6ce
Operating system & version
Win 10
What you did
Adding a Component (Empty Struct) to Example sprite,rs
What you expected to happen
Sprite Component should be added
What actually happened
Panic
Additional information
It works when adding the
at the end like:
The text was updated successfully, but these errors were encountered: