-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Bevy version
Bevy 0.7.0.
System information
Running Rust stable 1.62.0 on Windows 10.
What you did
I accidentally deleted .run()
from the end of a long chain of systems and plugins being set up in main()
, but without deleting the semicolon after (therefore producing no errors).
What went wrong
The game ran, but instantly exited without problems. This is technically expected behavior, but feels extremely unintuitive that a game engine might not provide an explicit warning if you don't activate a main loop of some sort. This would prevent, say, 15 minutes of debugging with impossible results before a programmer remembers it would be quicker to check the diff from the last git commit. Hypothetically, I mean.
Suggested fix
A #[must_use]
on the functions that return what .run()
uses seems like a reasonable idea. (Thanks to @BoxyUwU for the idea.)