Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time stop hotkey doesn't work when the editor panels aren't open #74

Open
InnocentusLime opened this issue Apr 16, 2023 · 0 comments
Open

Comments

@InnocentusLime
Copy link

InnocentusLime commented Apr 16, 2023

System configuration

OS: Windows 11 (However, it seems that it might be a crossplatform issue)
Bevy: 0.10.1 (from crates.io)

rustc --version: rustc 1.68.2 (9eb3afe9e 2023-03-27)
rustup default: stable-x86_64-pc-windows-msvc

bevy startup output:

2023-04-16T13:03:12.341333Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon (TM) Graphics", vendor: 4098, device: 5607, device_type: IntegratedGpu, driver: "AMD proprietary driver", driver_info: "21.40.52", backend: Vulkan }
2023-04-16T13:03:13.221788Z  INFO bevy_editor_pls_default_windows::cameras: Spawning editor cameras
2023-04-16T13:03:13.827399Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "22621", cpu: "AMD Ryzen 7 5825U with Radeon Graphics", core_count: "8", memory: "14.8 GiB" }

What versions have this issue

This problem happens with bevy_editor_pls 0.4 and the latest version on the main branch on github (f202123).

The issue

When I launch this program and press the time pause hotkey -- LCtrl + Return -- the sprite keeps flickering. At the same time, it looks as if the input wasn't dropped, because the Pause time box in the Debug settings does get checked

"pause time" box is checked

Code to reproduce the issue

use bevy::prelude::*;
use bevy_editor_pls::EditorPlugin;

fn startup(
    asset_server: Res<AssetServer>,
    mut commands: Commands,
) {
    commands.spawn(Camera2dBundle::default());
    commands.spawn(SpriteBundle {
        texture: asset_server.load("bevy.png"),
        ..default()
    });
}

fn tick(
    time: Res<Time>,
    mut sprite_q: Query<&mut Sprite>,
) {
    let secs = time.elapsed_seconds();
    let evenness = (secs * 2.0f32) as i32 % 2;
    sprite_q.single_mut().color.set_b(evenness as f32);
    sprite_q.single_mut().color.set_g(evenness as f32);
}

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(EditorPlugin::default())
        .add_startup_system(startup)
        .add_system(tick)
        .run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant