mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-28 08:58:07 +00:00
Fix possible None unwrap
This commit is contained in:
@@ -64,7 +64,10 @@ fn tick_mixamo_import(
|
|||||||
) {
|
) {
|
||||||
for event in er_scene_events.read() {
|
for event in er_scene_events.read() {
|
||||||
if let AssetEvent::LoadedWithDependencies { id } = event {
|
if let AssetEvent::LoadedWithDependencies { id } = event {
|
||||||
let gltf = ra_gltfs.get(&**r_mixamo_import).unwrap();
|
let Some(gltf) = ra_gltfs.get(&**r_mixamo_import) else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
if gltf.default_scene.is_some() && gltf.default_scene.as_ref().unwrap().id() == *id {
|
if gltf.default_scene.is_some() && gltf.default_scene.as_ref().unwrap().id() == *id {
|
||||||
st_next.set(MixamoState::Spawning);
|
st_next.set(MixamoState::Spawning);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user