Hi,
I'm currently learning Bevy and I'm trying to implement a Conway's Game Of Life using it. My game logic is done and I want to start making the Bevy implementation now. I want to render a Grid and here is the code responsible for it: ```rust
pub fn spawn_grid(
&self,
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<ColorMaterial>>,
) {
let square_width = self.window_width as f32 / self.board_width as f32;
let square = Rectangle::new(square_width, square_width);
for y in 0..self.board_height {
for x in 0..self.board_width {
println!("Spawn at x={x},y={y}");
commands.spawn(MaterialMesh2dBundle {
mesh: meshes.add(square).into(),
material: materials.add(ALIVE_COLOR),
transform: Transform::default().with_scale(Vec3::splat(200.0)),
..default()
});
}
}
}
However, it renders nothing on the window, despite it having a ``Camera2dBundle`` setup elsewhere in the code. The ALIVE_COLOR is a huge green. How can I fix it ?