TeaSkittles
05/21/2023, 12:23 AMAudioEvents
resource, when a resource does not exist, the error message in world.rs
does not contain the actual audio handle information such that it can be easily understood which audio file is missing.
Code in world.rs:
pub fn resource(&self) -> AtomicResource {
match self.resources.try_get::() {
Some(r) => r,
None => panic!(
"Requested resource {} does not exist in the World
.
Did you forget to add it using world.insert_resource
/ world.init_resource
?",
std::any::type_name::()
),
}
}
Error:
thread 'main' panicked at 'Requested resource bones_render::audio::AudioEvents does not exist in the World
.
Did you forget to add it using world.insert_resource
/ world.init_resource
?', /home/austin/.cargo/git/checkouts/bones-b608aa0d074178a4/5e8436e/crates/bones_ecs/src/world.rs:126:21