use of undeclared type ShapeBuilder
#273
Answered
by
rparrett
shown-zhang
asked this question in
Q&A
-
[dependencies] failed to resolve: use of undeclared type |
Beta Was this translation helpful? Give feedback.
Answered by
rparrett
Jan 2, 2025
Replies: 2 comments 1 reply
-
use bevy::prelude::*;
use bevy_prototype_lyon::prelude::*;
fn main() {
let mut app = App::new();
app.add_plugins(DefaultPlugins);
app.add_plugins(ShapePlugin);
app.run();
}
fn setup_system(mut commands: Commands) {
let shape = shapes::RegularPolygon {
sides: 6,
feature: shapes::RegularPolygonFeature::Radius(200.0),
..shapes::RegularPolygon::default()
};
commands.spawn((Camera2d));
commands.spawn(
ShapeBuilder::with(&shape)
.fill(DARK_CYAN)
.stroke((BLACK, 10.0))
.build(),
);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
It looks like you're using example code from the Please look at the examples for the latest released version. They're available in the https://github.com/Nilirad/bevy_prototype_lyon/tree/latest/examples |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shown-zhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like you're using example code from the
main
branch, which includes an unreleased refactor.Please look at the examples for the latest released version. They're available in the
latest
branch.https://github.com/Nilirad/bevy_prototype_lyon/tree/latest/examples