startup_system/
startup_system.rs

1//! Demonstrates a startup system (one that runs once when the app starts up).
2
3use bevy::prelude::*;
4
5fn main() {
6    App::new()
7        .add_systems(Startup, startup_system)
8        .add_systems(Update, normal_system)
9        .run();
10}
11
12/// Startup systems are run exactly once when the app starts up.
13/// They run right before "normal" systems run.
14fn startup_system() {
15    println!("startup system ran first");
16}
17
18fn normal_system() {
19    println!("normal system ran second");
20}