You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Objective
As we move more stuff to entities, it's a good idea to keep these
entities quasi-private. We do not want to confuse users by having to
explain everything as being an entity.
This came out of #19711.
## Solution
This PR introduces the concept of internal entities, entities marked by
the `Internal` component, that are filtered out by queries through
`DefaultQureyFilters` and also don't show up for
`World::entity_count()`.
## Testing
Added a test.
Bevy 0.17 introduces internal entities. Entities tagged by the `Internal` component that are hidden from most queries using [`DefaultQueryFilters`](https://docs.rs/bevy/latest/bevy/ecs/entity_disabling/index.html).
7
+
8
+
Currently, both [`Observer`s](https://docs.rs/bevy/latest/bevy/ecs/observer/struct.Observer.html) and systems that are registered through [`World::register_system`](https://docs.rs/bevy/latest/bevy/prelude/struct.World.html#method.register_system) are considered internal entities.
9
+
10
+
If you queried them before, add the `Allows<Internal>` filter to the query to bypass the default filter.
0 commit comments