From 3280318dd18855dda8832daca7bf591c8c98cafb Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Mon, 22 Aug 2022 00:37:34 +0100 Subject: [PATCH] Merge pull request #3 from dollisgame/reduce-dependencies Minimise bevy feature dependencies and add bevy_ui feature. --- Cargo.toml | 10 ++++++++-- src/lib.rs | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7dbc627..6a11116 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,9 @@ categories = ["game-engines", "rendering"] [dependencies] bevy = { version = "0.8", default-features = false, features = [ "bevy_asset", - "render", + "bevy_render", + "bevy_pbr", + "bevy_core_pipeline", ] } thiserror = "1.0" @@ -23,6 +25,10 @@ bevy = { version = "0.8", default-features = false, features = [ "x11", ] } +[features] +default = ["bevy_ui"] +bevy_ui = ["bevy/bevy_ui"] + [[example]] name = "shapes" -path = "examples/shapes.rs" \ No newline at end of file +path = "examples/shapes.rs" diff --git a/src/lib.rs b/src/lib.rs index 5cb8ddf..91b5ad9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,6 +236,7 @@ impl Plugin for OutlinePlugin { OUTLINE_PASS_NODE_NAME, ) .unwrap(); + #[cfg(feature = "bevy_ui")] draw_3d_graph .add_node_edge( OUTLINE_PASS_NODE_NAME,