Skip to content

WindowDescriptor added through a startup_system command always uses default WindowDescriptor from default #278

@scriptandcompile

Description

@scriptandcompile

The code below demonstrates the bug. This should create a window with the title of 'test' but instead will create one with the title of 'bevy', at least on Linux. I haven't tested this on any other platform.

use bevy::prelude::*;

fn main() {
    App::build()
        .add_startup_system(ui_loader.system())
        .add_default_plugins()
        .run();
}

fn ui_loader(mut commands: Commands) {
    let window = WindowDescriptor {
        title: "test".to_string(),
        width: 200,
        height: 300,
        vsync: true,
    };
    commands.insert_resource(window);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions