-
-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Tested on: 0.1.0-alpha.1 in Blender 4.2.3 LTS with default plugin settings.
Setup: I have a World scene and Library scene as suggested in the documentation. Prepared 2 blueprints for my player and obstacle objects in Library section and I marked them as Assets in Blender side.
Issue: It works as expected when I instance blueprints in the World scene in Blender side and load the World scene in Bevy side. All materials are loaded when spawning World.glb and blueprints look as they should have in game.
But if I remove my blueprint instances from the World scene in Blender and try to load them on demand in Bevy side with this suggested snippet, materials which used by the blueprint are not loaded in Bevy even though they are exported successfully from Blender project.
I noticed the assets array in .meta.ron files are empty for the exported blueprints. Manually adding the relevant materials to this array fixes the issue. Is there a specific reason that Blender plugin does not populate this array when exporting? Or is there a relevant setting I'm missing on?
Player and Obstacles are instanced in World scene in Blender:

fn setup(mut commands: Commands) {
commands.spawn((
BlueprintInfo::from_path("levels/World.glb"),
SpawnBlueprint,
HideUntilReady,
GameWorldTag,
));
}
Player is not in World scene but spawned separately in bevy side:

fn setup(mut commands: Commands) {
commands.spawn((
BlueprintInfo::from_path("levels/World.glb"),
SpawnBlueprint,
HideUntilReady,
GameWorldTag,
));
commands.spawn((
BlueprintInfo::from_path("blueprints/player.glb"),
SpawnBlueprint,
TransformBundle::from_transform(Transform::from_xyz(0.0, 0.0, 0.0)),
));
}
player.meta.ron
(
assets:
[
]
)