diff --git a/crates/bevy_gltf/src/lib.rs b/crates/bevy_gltf/src/lib.rs index 7277a906269f5..fc022bf94ff20 100644 --- a/crates/bevy_gltf/src/lib.rs +++ b/crates/bevy_gltf/src/lib.rs @@ -40,20 +40,23 @@ impl GltfPlugin { impl Plugin for GltfPlugin { fn build(&self, app: &mut App) { + app.register_type::() + .add_asset::() + .add_asset::() + .add_asset::() + .add_asset::(); + } + + fn finish(&self, app: &mut App) { let supported_compressed_formats = match app.world.get_resource::() { Some(render_device) => CompressedImageFormats::from_features(render_device.features()), - None => CompressedImageFormats::all(), + None => CompressedImageFormats::NONE, }; app.add_asset_loader::(GltfLoader { supported_compressed_formats, custom_vertex_attributes: self.custom_vertex_attributes.clone(), - }) - .register_type::() - .add_asset::() - .add_asset::() - .add_asset::() - .add_asset::(); + }); } }