Skip to content

UiPlugin cannot be used without rendering #3815

@alice-i-cecile

Description

@alice-i-cecile

Bevy version

0.6

What you did

use bevy::prelude::*;
use bevy::ui::UiPlugin;

fn main() {
    App::new()
        .add_plugins(MinimalPlugins)
        .add_plugin(UiPlugin)
        .run();
}

What actually happened

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\Alice\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_ui-0.6.0\src\render\mod.rs:62:70

This panic is in

pub fn build_ui_render(app: &mut App) {
.

Additional information

Related to #3155.

This is essential for headless integration testing of UI logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions