-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Description
Bevy version and features
- Main @ fcd5c26
What you did
// My app does not include the diagnostics plugin, so the DiagnosticsBuffer within Diagnostics will fail to apply.
fn my_optional_diagnostics_system(mut diagnostics: If<Diagnostics>) {
// I only want these measurements to be sent when diagnostics exist.
}
What went wrong
The SystemBuffer in DiagnosticsBuffer gets applied, resulting in a panic since the DiagnosticsStore does not exist.
While the DiagnosticsBuffer probably should avoid panicking in this case, we also probably shouldn't be applying Deferred
if the system never ran! This is most visible using the If
type to automatically skip systems when the DiagnosticsStore is missing.
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong