added log! macro

This commit is contained in:
TotallyNot 2024-01-01 11:59:18 +01:00
parent 86f9333aec
commit b45d04b872
5 changed files with 140 additions and 522 deletions

View file

@ -180,8 +180,11 @@ impl Simulation {
#[cfg(feature = "json")]
pub fn read_log(&self) -> serde_json::Value {
use entity_registry::EntityRegistry;
let log = self.0.world.resource::<Log>();
log.to_value()
let registry = self.0.world.resource::<EntityRegistry>();
log.to_value(registry)
}
}