mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
97131e1909
# Objective - As @james7132 said [on Discord](https://discord.com/channels/691052431525675048/692572690833473578/1224626740773523536), the `close_on_esc` system is forcing `bevy_window` to depend on `bevy_input`. - `close_on_esc` is not likely to be used in production, so it arguably does not have a place in `bevy_window`. ## Solution - As suggested by @afonsolage, move `close_on_esc` into `bevy_dev_tools`. - Add an example to the documentation too. - Remove `bevy_window`'s dependency on `bevy_input`. - Add `bevy_reflect`'s `smol_str` feature to `bevy_window` because it was implicitly depended upon with `bevy_input` before it was removed. - Remove any usage of `close_on_esc` from the examples. - `bevy_dev_tools` is not enabled by default. I personally find it frustrating to run examples with additional features, so I opted to remove it entirely. - This is up for discussion if you have an alternate solution. --- ## Changelog - Moved `bevy_window::close_on_esc` to `bevy_dev_tools::close_on_esc`. - Removed usage of `bevy_dev_tools::close_on_esc` from all examples. ## Migration Guide `bevy_window::close_on_esc` has been moved to `bevy_dev_tools::close_on_esc`. You will first need to enable `bevy_dev_tools` as a feature in your `Cargo.toml`: ```toml [dependencies] bevy = { version = "0.14", features = ["bevy_dev_tools"] } ``` Finally, modify any imports to use `bevy_dev_tools` instead: ```rust // Old: // use bevy:🪟:close_on_esc; // New: use bevy::dev_tools::close_on_esc; App::new() .add_systems(Update, close_on_esc) // ... .run(); ``` |
||
---|---|---|
.. | ||
3d_scene.rs | ||
3d_shapes.rs | ||
3d_viewport_to_world.rs | ||
animated_material.rs | ||
anti_aliasing.rs | ||
atmospheric_fog.rs | ||
blend_modes.rs | ||
bloom_3d.rs | ||
deferred_rendering.rs | ||
fog.rs | ||
generate_custom_mesh.rs | ||
irradiance_volumes.rs | ||
lighting.rs | ||
lightmaps.rs | ||
lines.rs | ||
load_gltf.rs | ||
meshlet.rs | ||
orthographic.rs | ||
parallax_mapping.rs | ||
parenting.rs | ||
pbr.rs | ||
reflection_probes.rs | ||
render_to_texture.rs | ||
shadow_biases.rs | ||
shadow_caster_receiver.rs | ||
skybox.rs | ||
spherical_area_lights.rs | ||
split_screen.rs | ||
spotlight.rs | ||
ssao.rs | ||
texture.rs | ||
tonemapping.rs | ||
transmission.rs | ||
transparency_3d.rs | ||
two_passes.rs | ||
update_gltf_scene.rs | ||
vertex_colors.rs | ||
wireframe.rs |