bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
34.23k stars 3.35k forks source link

visible: false on WindowPlugin Stops Rendering #14135

Closed igorlp closed 6 days ago

igorlp commented 2 weeks ago

Bevy version

0.14

Relevant system information

`SystemInfo { os: "Windows 11 Home", kernel: "22635", cpu: "AMD Ryzen 7 5800X3D 8-Core Processor", core_count: "8", memory: "31.9 GiB" }`
`AdapterInfo { name: "NVIDIA GeForce RTX 4060 Ti", vendor: 4318, device: 10243, device_type: DiscreteGpu, driver: "", driver_info: "", backend: Dx12 }`

What you did

Set visible: false on WindowPlugin

What went wrong

Systems added to "Update" no longer trigger.

Using:

fn setup_window(mut window: Query<&mut Window>, frames: Res<FrameCount>) {
    println!("{}", frames.0);
    if frames.0 == 3 {
        window.single_mut().visible = true;
    }
}

If visible is set to false by default, we only see 0 in the console, once. If set to true, we see the frame count as expected for every frame.

Additional information

Also happens on Bevy example found here

mockersf commented 2 weeks ago

Also happens on Bevy example found here

How do you see that issue in Wasm? It's supposed to stay black...

Themayu commented 2 weeks ago

Issue does not appear on the WASM example; the make_visible system runs fine, and all other Update systems in the example function normally.

Perhaps they were trying to say that it appears if you run the example locally?

alice-i-cecile commented 2 weeks ago

Can you try just before and after https://github.com/bevyengine/bevy/pull/14023 please?

igorlp commented 2 weeks ago

Perhaps they were trying to say that it appears if you run the example locally?

Correct!

Can you try just before and after https://github.com/bevyengine/bevy/pull/14023 please?

Works with:

bevy = { version = "=0.14.0-rc.4" }
bevy_winit = { version = "=0.14.0-rc.4" }

Does not work with:

bevy = { version = "0.14.0" }
bevy_winit = { version = "0.14.0" }

(used bevy_winit to trigger other bevy packages to be downgraded to rc4, not sure if issue is related to bevy_winit itself)

janhohenheim commented 1 week ago

Little update: this issue can not be reproduced on the current main on Intel macOS or Linux (both with or without Wayland). It really does seem to be Windows-specific.