Skip to content

Commit 350ee3f

Browse files
Update migration guide to cover VisibleEntities (#2059)
1 parent a59d012 commit 350ee3f

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
- `check_visibility` no longer takes a `QueryFilter`, and there’s no need to add it manually to your app schedule anymore for custom rendering items. Instead, entities with custom renderable components should add the appropriate type IDs to `VisibilityClass`. See `custom_phase_item` for an example.
1+
`check_visibility` no longer takes a `QueryFilter`, and there’s no need to add it manually to your app schedule anymore for custom rendering items. Instead, entities with custom renderable components should add the appropriate type IDs to `VisibilityClass`. See `custom_phase_item` for an example.
2+
3+
Similarly, all methods on `VisibleEntities` (such as `get` and `iter`) no longer take a generic parameter, and instead must be passed a `TypeId` corresponding to the component used in the `VisibilityClass` of the entity.
4+
5+
Before:
6+
7+
```rust
8+
visible_entities.get_mut<With<Mesh3d>>();
9+
```
10+
11+
After:
12+
13+
```rust
14+
visible_entities.get_mut(TypeId::of::<Mesh3d>());
15+
```

release-content/0.16/migration-guides/_guides.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ areas = ["Rendering"]
822822
file_name = "17063_Refactor_and_simplify_custom_projections.md"
823823

824824
[[guides]]
825-
title = "Remove the type parameter from `check_visibility`, and only invoke it once."
825+
title = "Remove the type parameter from `check_visibility` and `VisibleEntities`"
826826
prs = [16812]
827827
areas = ["Rendering"]
828828
file_name = "16812_Remove_the_type_parameter_from_check_visibility_and_only_i.md"

0 commit comments

Comments
 (0)