We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d637af0 commit efbebceCopy full SHA for efbebce
crates/bevy_asset/src/reflect.rs
@@ -145,6 +145,8 @@ impl<A: Asset + FromReflect> FromType<A> for ReflectAsset {
145
asset.map(|asset| asset as &dyn Reflect)
146
},
147
get_unchecked_mut: |world, handle| {
148
+ // SAFETY: `get_unchecked_mut` must be callied with `InteriorMutableWorld` having access to `Assets<A>`,
149
+ // and must ensure to only have at most one reference to it live at all times.
150
let assets = unsafe { world.get_resource_mut::<Assets<A>>().unwrap().into_inner() };
151
let asset = assets.get_mut(&handle.typed());
152
asset.map(|asset| asset as &mut dyn Reflect)
0 commit comments