diff --git a/framework_crates/bones_ecs/src/resources.rs b/framework_crates/bones_ecs/src/resources.rs index 9eed6d9b58..883d9fcc1d 100644 --- a/framework_crates/bones_ecs/src/resources.rs +++ b/framework_crates/bones_ecs/src/resources.rs @@ -242,6 +242,7 @@ impl Resources { } /// Borrow a resource. + #[track_caller] pub fn get(&self) -> Option> { let b = self.untyped.get(T::schema()).borrow(); if b.is_some() { @@ -254,6 +255,7 @@ impl Resources { } /// Borrow a resource. + #[track_caller] pub fn get_mut(&self) -> Option> { let b = self.untyped.get(T::schema()).borrow_mut(); if b.is_some() { diff --git a/framework_crates/bones_lib/src/lib.rs b/framework_crates/bones_lib/src/lib.rs index fc975f0c9b..996b7b23fa 100644 --- a/framework_crates/bones_lib/src/lib.rs +++ b/framework_crates/bones_lib/src/lib.rs @@ -208,6 +208,7 @@ impl Game { plugin.install(self); self } + #[track_caller] /// Get the shared resource of a given type out of this [`Game`]s shared resources. pub fn shared_resource(&self) -> Option> { let res = self @@ -226,6 +227,7 @@ impl Game { } } + #[track_caller] /// Get the shared resource of a given type out of this [`Game`]s shared resources. pub fn shared_resource_mut(&self) -> Option> { let res = self