Skip to content

Commit b6bd6db

Browse files
andriyDevcart
authored andcommitted
Allow reading the individual accesses of a FilteredAccessSet. (#22423)
# Objective - A `FilteredAccessSet` doesn't give access to the individual filters. This is sad for introspecting the access of systems (e.g., for visualizing systems in a schedule). ## Solution - Add a getter for `filtered_accesses`.
1 parent 6ae4aef commit b6bd6db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/bevy_ecs/src/query/access.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,12 @@ impl FilteredAccessSet {
13221322
&self.combined_access
13231323
}
13241324

1325+
/// Returns a reference to the filtered accesses of the set.
1326+
#[inline]
1327+
pub fn filtered_accesses(&self) -> &[FilteredAccess] {
1328+
&self.filtered_accesses
1329+
}
1330+
13251331
/// Returns `true` if this and `other` can be active at the same time.
13261332
///
13271333
/// Access conflict resolution happen in two steps:

0 commit comments

Comments
 (0)