Fix broken mesh2d (#15838)

Forgot to clean this up when I was still trying to figure out what was
broken.

Closes #15835.
This commit is contained in:
charlotte 2024-10-10 14:28:45 -07:00 committed by GitHub
parent a06802a66e
commit da211ee314
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ use bevy_ecs::{
};
use bevy_math::FloatOrd;
use bevy_reflect::{prelude::ReflectDefault, Reflect};
use bevy_render::sync_world::{MainEntity, MainEntityHashMap};
use bevy_render::sync_world::MainEntityHashMap;
use bevy_render::view::RenderVisibleEntities;
use bevy_render::{
mesh::{MeshVertexBufferLayoutRef, RenderMesh},
@ -501,8 +501,7 @@ impl<P: PhaseItem, M: Material2d, const I: usize> RenderCommand<P>
) -> RenderCommandResult {
let materials = materials.into_inner();
let material_instances = material_instances.into_inner();
let Some(material_instance) = material_instances.get(&MainEntity::from(item.entity()))
else {
let Some(material_instance) = material_instances.get(&item.main_entity()) else {
return RenderCommandResult::Skip;
};
let Some(material2d) = materials.get(*material_instance) else {