Actually, functions will automatically implement either ForEachSystem or IntoQuerySystem if its signature is correct. Since these traits are imported in prelude, we can run .system() on any valid function to get a system without macros.
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
Thanks. How does it know that
fn setup
is a system. Do we add#[system]
macro above it ?Actually, functions will automatically implement either ForEachSystem or IntoQuerySystem if its signature is correct. Since these traits are imported in prelude, we can run
.system()
on any valid function to get a system without macros.