From 7d9b6aeafc25d1a572ff8e9d7d75c8fced0b0531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Rom=C3=A1n=20N=C3=BA=C3=B1ez?= Date: Sat, 19 Sep 2026 19:07:39 +0000 Subject: [PATCH] Fix headless asset preprocessing hang (#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - register Bevy's image loader explicitly in the headless asset processor - use no GPU-compressed image formats because the processor has no render device - allow PNG processing tasks to complete so `ProcessorState` reaches `Finished` Co-authored-by: Álex Román Núñez --- src/bin/process-assets.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/process-assets.rs b/src/bin/process-assets.rs index 0abc55c..98912a9 100644 --- a/src/bin/process-assets.rs +++ b/src/bin/process-assets.rs @@ -2,7 +2,7 @@ use bevy::{ app::ScheduleRunnerPlugin, asset::{AssetMode, AssetPlugin, processor::AssetProcessor, processor::ProcessorState}, gltf::GltfPlugin, - image::ImagePlugin, + image::{CompressedImageFormats, ImageLoader, ImagePlugin}, prelude::*, tasks::block_on, text::TextPlugin, @@ -19,6 +19,7 @@ fn main() -> ExitCode { ..default() }) .add_plugins((ImagePlugin::default(), TextPlugin, GltfPlugin::default())) + .register_asset_loader(ImageLoader::new(CompressedImageFormats::NONE)) .add_plugins(AssetProcessingPlugin) .add_systems(Update, finish_when_processed);