Fix query_gltf_primitives example (#15715)

This example was missed during the port to required components for
meshes and materials.
Easy fix, I checked that it works as it did in the PR that added the
example (#13912).
This commit is contained in:
Tim 2024-10-07 23:03:16 +00:00 committed by GitHub
parent 9b863be2fb
commit 0c959f7700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,11 @@ fn find_top_material_and_mesh(
mut materials: ResMut<Assets<StandardMaterial>>,
mut meshes: ResMut<Assets<Mesh>>,
time: Res<Time>,
mat_query: Query<(&Handle<StandardMaterial>, &Handle<Mesh>, &GltfMaterialName)>,
mat_query: Query<(
&MeshMaterial3d<StandardMaterial>,
&Mesh3d,
&GltfMaterialName,
)>,
) {
for (mat_handle, mesh_handle, name) in mat_query.iter() {
// locate a material by material name