make bevy_pbr optional in bevy_gizmos_render again#23136
make bevy_pbr optional in bevy_gizmos_render again#23136ChristopherBiscardi wants to merge 4 commits intobevyengine:mainfrom
Conversation
atlv24
left a comment
There was a problem hiding this comment.
good catch but also yuck, this shouldnt hard or soft dep on pbr at all. not sure it can be untangled until Charlotte's work lands though
alice-i-cecile
left a comment
There was a problem hiding this comment.
We should only be cfg gating the ordering, not the addition of the system.
You can use configure_sets to do this nicely.
|
@alice-i-cecile Upon further inspection of the functionality added in the original PR, the only reason I can see that this would need to be ordered is if it accessed @Zeophlite Was there another reason this system was ordered against fn init_line_gizmo_uniform_bind_group_layout(mut commands: Commands) {
let line_layout = BindGroupLayoutDescriptor::new(
"LineGizmoUniform layout",
&BindGroupLayoutEntries::single(
ShaderStages::VERTEX,
uniform_buffer::<LineGizmoUniform>(true),
),
);
commands.insert_resource(LineGizmoUniformBindgroupLayout {
layout: line_layout,
});
} |
|
The system that needed ordering was |
Objective
https://github.com/bevyengine/bevy/pull/22443/changes#diff-0425515a2f1ec5b53401db2850b549c2d6634bc1c3e2ae9698d0ccfb172f2387R36 introduced a hard dependency on bevy_pbr to bevy_render_gizmos, which is marked as optional and will not compile if the optional dep is not enabled:
Solution
hide it behind the same bevy_pbr flags as the other bevy_pbr code
Testing
Use
bevy_gizmos_renderas a path dependency in a freshlycargo new'd project.