Blender_bevy_components_workflow
Blender_bevy_components_workflow copied to clipboard
Spawned blueprints are immediately despawned.
The "root" entities remain, but all their contents are not there.
I was able to fix this with the following commented out line:
commands.entity(original).remove::<SpawnHere>();
commands.entity(original).remove::<Spawned>();
// commands.entity(original).remove::<Handle<Scene>>();
commands.entity(original).remove::<AssetsToLoad<Gltf>>(); // also clear the sub assets tracker to free up handles, perhaps just freeing up the handles and leave the rest would be better ?
commands.entity(original).remove::<BlueprintAssetsLoaded>();
commands.entity(root_entity).despawn_recursive();
}
In line 95 of crates/bevy_gltf_blueprints/src/spawn_post_process.rs.
I'm not sure if this is the correct fix hence why it's not a PR. Perhaps in Bevy 0.14, the scenes are despawned if the handle is removed?
Hi @andriyDev , which version of the crate are you using ? I noticed the same issue with the scene handles, but that is fixed for Blenvy in the upcoming release.
@kaosat-dev I am using the main branch, so bevy_gltf_blueprint 0.11.0.
Ok sounds good! I figured with the new Blenvy release this would be the case, so this can probably be closed once that's all merged.