bevy_svg icon indicating copy to clipboard operation
bevy_svg copied to clipboard

Samples fail if [3d] feature is not enabled

Open targrub opened this issue 2 years ago • 2 comments

Modifying the [features] block of Cargo.toml to

[features]
default = ["2d"]
2d = ["bevy/bevy_sprite"]

yielded me the following warnings

2022-09-13T21:47:08.231401Z  WARN bevy_ecs::schedule::graph_utils: bevy_window::system::exit_on_all_closed wants to be after unknown label: ModifiesWindows
2022-09-13T21:47:08.231600Z  WARN bevy_ecs::schedule::graph_utils: bevy_render::camera::camera::camera_system<bevy_render::camera::projection::Projection> wants to be after unknown label: ModifiesWindows
2022-09-13T21:47:08.231817Z  WARN bevy_ecs::schedule::graph_utils: bevy_render::camera::camera::camera_system<bevy_render::camera::projection::OrthographicProjection> wants to be after unknown label: ModifiesWindows  
2022-09-13T21:47:08.231954Z  WARN bevy_ecs::schedule::graph_utils: bevy_render::camera::camera::camera_system<bevy_render::camera::projection::PerspectiveProjection> wants to be after unknown label: ModifiesWindows

no window, and the end of execution for any of the 2d example programs. This is with the latest code in main.

targrub avatar Sep 13 '22 22:09 targrub

Hm...i am not able to reproduce this error, but you shouldn't just remove a feature from Cargo.toml which is used to include/remove parts of the code.

Can you try cargo run --example 2d_two_colors --no-default-features --features 2d instead of removing something from Cargo.toml? Do you then still get the error?

Weasy666 avatar Sep 14 '22 06:09 Weasy666

You're right; reverting my changes to bevy_svg's Cargo.toml and running it as you suggest got the example working again.

However, if I do this:

[dev-dependencies]
bevy = { version = "0.8", default-features = false, features = ["bevy_asset", "bevy_core_pipeline", "bevy_render"] }
#bevy = { version = "0.8", default-features = true }

I get the error.

targrub avatar Sep 14 '22 16:09 targrub

Sorry for the late reply. If you haven't already solved it, adding the "bevy_winit" feature solves your problem. Without a window from the OS, Bevy can't draw the pipeline result anywhere.

If you have any questions left, feel free to ask, i'll try to answer as fast as i can.

Weasy666 avatar Jan 03 '23 15:01 Weasy666