Skip to content

FPS Overlay plugin system ambiguity #22571

@SUPERCILEX

Description

@SUPERCILEX

Bevy version and features

0.18

Issue

WARN bevy_ecs::schedule::schedule: Update schedule built successfully, however: 3 pairs of systems with conflicting data access have indeterminate execution order. Consider adding `before`, `after`, or `ambiguous_with` relationships between these:
 -- update_text and customize_overlay (in set (customize_overlay, toggle_display))
    conflict on: ["bevy_text::text_access::TextIterScratch", "bevy_ui::widget::text::Text", "bevy_text::text::TextFont", "bevy_text::text::TextColor", "bevy_text::text::LineHeight", "bevy_text::text::TextSpan"]
 -- update_text and update_stats
    conflict on: ["bevy_text::text_access::TextIterScratch", "bevy_ui::widget::text::Text", "bevy_text::text::TextFont", "bevy_text::text::TextColor", "bevy_text::text::LineHeight", "bevy_text::text::TextSpan"]
 -- customize_overlay (in set (customize_overlay, toggle_display)) and update_stats
    conflict on: ["bevy_text::text_access::TextIterScratch", "bevy_ui::widget::text::Text", "bevy_text::text::TextFont", "bevy_text::text::TextColor", "bevy_text::text::LineHeight", "bevy_text::text::TextSpan"]

My update stats system:

fn update_stats(
    stats: Res<Stats>,
    query: Query<Entity, With<StatsText>>,
    mut writer: TextUiWriter, // I think this is the problem?
)  { ... }

Resolution

Ideally the FPS Overlay plugin systems wouldn't conflict with any systems. Or maybe there's something I should be doing to avoid the warnings? I enabled them like this:

        for schedule in MainScheduleOrder::default().labels {
            app.edit_schedule(schedule, |schedule| {
                schedule.set_build_settings(ScheduleBuildSettings {
                    ambiguity_detection: LogLevel::Warn,
                    ..default()
                });
            });
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Dev-ToolsTools used to debug Bevy applications.C-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions