#Background color not changing when using .insert_resource

5 messages · Page 1 of 1 (latest)

mossy sedge
#

Trying to start a bevy program, when I make a simple program that has a new app with a window descriptor and the default plugins added anytime i try to change the color of my background using .insert_resource(ClearColor(Color::rgb(0.25, 0.25, 0.75)) the color stays black. I'm decently sure its not a dependency issue, I made sure to recheck and update my system. Here is the actual code ```rs
use bevy::prelude::*;

fn main() {
App::new()
.insert_resource(ClearColor(Color::rgb(0.25, 0.25, 0.75)))
.insert_resource( WindowDescriptor {
width: 800.,
height: 600.,
title: String::from("Test Project"),
..Default::default()
})
.add_plugins(DefaultPlugins)
.run();
}```

dusk yew
#

That resource sets the default clear color for cameras. You'll have to spawn a camera to see it.

raw breach
#

You are probably missing a Camera.

mossy sedge
#

I'll try that right now