Skip to content

Commit 4b14a61

Browse files
Must specify type of VisibleEntities when accessing
[12582](bevyengine/bevy#12582) divided `VisibleEntities` into separate lists. So now we have to specify which kind of entity we want. I think we want the Mesh here, and I think we can get rid of the `.index` calls on Entity since Entity [already compares bits](https://docs.rs/bevy_ecs/0.14.0-rc.2/src/bevy_ecs/entity/mod.rs.html#173) for optimized codegen purposes. Waiting to do that until the other changes are in though so as to not change functionality until post-upgrade.
1 parent ad615dc commit 4b14a61

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/render/material.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use bevy::{
1717
},
1818
renderer::RenderDevice,
1919
texture::{FallbackImage, GpuImage},
20-
view::{ExtractedView, ViewUniforms, VisibleEntities},
20+
view::{ExtractedView, ViewUniforms, VisibleEntities, WithMesh},
2121
Extract, Render, RenderApp, RenderSet,
2222
},
2323
utils::{HashMap, HashSet},
@@ -421,8 +421,7 @@ pub fn queue_material_tilemap_meshes<M: MaterialTilemap>(
421421

422422
for (entity, chunk_id, transform, tilemap_id) in standard_tilemap_meshes.iter() {
423423
if !visible_entities
424-
.entities
425-
.iter()
424+
.iter::<WithMesh>()
426425
.any(|&entity| entity.index() == tilemap_id.0.index())
427426
{
428427
continue;
@@ -539,8 +538,7 @@ pub fn bind_material_tilemap_meshes<M: MaterialTilemap>(
539538

540539
for (chunk_id, tilemap_id) in standard_tilemap_meshes.iter() {
541540
if !visible_entities
542-
.entities
543-
.iter()
541+
.iter::<WithMesh>()
544542
.any(|&entity| entity.index() == tilemap_id.0.index())
545543
{
546544
continue;

0 commit comments

Comments
 (0)