#bevy #gamedev #window

bevy_child_window

Allows you to create an embed child window in Bevy

5 releases

new 0.2.1 Apr 28, 2025
0.2.0 Apr 26, 2025
0.1.2 Mar 1, 2025
0.1.1 Feb 15, 2025
0.1.0 Feb 6, 2025

#885 in Game dev

Download history 135/week @ 2025-02-03 143/week @ 2025-02-10 43/week @ 2025-02-17 166/week @ 2025-02-24 144/week @ 2025-03-03 123/week @ 2025-03-10 10/week @ 2025-03-17 3/week @ 2025-03-24 3/week @ 2025-03-31 2/week @ 2025-04-07 9/week @ 2025-04-14 55/week @ 2025-04-21

70 downloads per month
Used in bevy_webview_wry

MIT/Apache

9.5MB
555 lines

bevy_child_window

Crates.io MIT/Apache 2.0

This library provides a way to create an embed child window in Bevy.

This is a library for bevy_webview_wry, but can be used in generic bevy applications.

webview

Supported platforms

Platform usable
Windows
MacOS
Linux(X11)
Linux(Wayland)
Web
Android
iOS

Usage

You can create the window as child by adding ParentWindow component to the entity.

use bevy::prelude::*;
use bevy::window::{PrimaryWindow, WindowResolution};
use bevy_child_window::prelude::*;

fn main() {
    App::new()
        .add_plugins((
            DefaultPlugins,
            ChildWindowPlugin,
        ))
        .add_systems(Startup, spawn_child_window)
        .run();
}

fn spawn_child_window(
    mut commands: Commands,
    parent: Query<Entity, With<PrimaryWindow>>,
) {
    commands.spawn((
        ParentWindow(parent.single()),
        Window {
            title: "Child Window".to_string(),
            resolution: WindowResolution::new(500.0, 500.0),
            ..Default::default()
        }
    ));
}

ChangeLog

Please see here.

Compatible Bevy versions

bevy_child_window bevy
0.1.0 ~ 0.15

License

This crate is licensed under the MIT License or the Apache License 2.0.

Contributing

Welcome to contribute by PR and issues!

Dependencies

~60–110MB
~2M SLoC