bevyengine/bevy · error
B0002
B0002
Error message
error[B0002]: Res<{}> in system {} conflicts with a previous system parameter. Consider removing the duplicate access using `Without<IsResource>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`. See: https://bevy.org/learn/errors/b0002 What it means
Error "error[B0002]: Res<{}> in system {} conflicts with a previous system parameter. Consider removing the duplicate access using `Without<IsResource>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`. See: https://bevy.org/learn/errors/b0002" thrown in bevyengine/bevy.
Source
Thrown at crates/bevy_ecs/src/system/system_param.rs:701
component_access_set: &mut FilteredAccessSet,
world: &mut World,
) {
let mut filter = FilteredAccess::default();
filter.add_read(component_id);
filter.and_with(IS_RESOURCE);
let conflicts = component_access_set.get_conflicts_single(&filter);
if conflicts.is_empty() {
component_access_set.add(filter);
return;
}
let mut accesses = conflicts.format_conflict_list(world.as_unsafe_world_cell());
// Access list may be empty (if access to all components requested)
if !accesses.is_empty() {
accesses.push(' ');
}
panic!("error[B0002]: Res<{}> in system {} conflicts with a previous system parameter. Consider removing the duplicate access using `Without<IsResource>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`. See: https://bevy.org/learn/errors/b0002", DebugName::type_name::<T>(), system_meta.name);
}
#[inline]
unsafe fn get_param<'w, 's>(
&mut component_id: &'s mut Self::State,
system_meta: &SystemMeta,
world: UnsafeWorldCell<'w>,
change_tick: Tick,
) -> Result<Self::Item<'w, 's>, SystemParamValidationError> {
let (ptr, ticks) = world.get_resource_with_ticks(component_id).ok_or_else(|| {
SystemParamValidationError::invalid::<Self>("Resource does not exist")
})?;
Ok(Res {
value: ptr.deref(),
ticks: ComponentTicksRef {
added: ticks.added.deref(),
changed: ticks.changed.deref(),
changed_by: ticks.changed_by.map(|changed_by| changed_by.deref()),View on GitHub (pinned to 396ca72708)
Solutions
- Remove the duplicate Res<T> parameter or the conflicting mutable access from the system signature
- Wrap conflicting accesses in a ParamSet<T0, T1, ...>
- If the conflict is with a query, add Without<IsResource> or a disjoint component filter to the query
- Split the system into two systems with disjoint access and order them explicitly
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/bevy_ecs/src/system/system_param.rs:701 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/b43b11b22326c60b.
Report an issue: GitHub.