Stores mesh names from glTF files in GltfMeshName component rather than Name component, making both GltfMeshName and GltfMaterialName behave like strings via Deref. # Objective Fixed the side effects of #19287 Fixes Examples that modify gltf materials are broken #19322 ## Solution Add GltfMeshName component and Deref implementations Stores mesh names from glTF files in GltfMeshName component rather than Name component, making both GltfMeshName and GltfMaterialName behave like strings via Deref. ## Testing cargo run --example depth_of_field cargo run --example lightmaps cargo run --example mixed_lighting They are consistent with the situation before the error occurred. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Rob Parrett <robparrett@gmail.com>
698 B
698 B
| title | authors | pull_requests | ||
|---|---|---|---|---|
| Use Gltf material names for spawned primitive entities |
|
|
When loading a Gltf scene in Bevy, each mesh primitive will generate an entity and store a GltfMaterialName component and Name component.
The Name components were previously stored as mesh name plus primitive index - for example, MeshName.0 and MeshName.1. To make it easier to view these entities in Inspector-style tools, they are now stored as mesh name plus material name - for example, MeshName.Material1Name and MeshName.Material2Name.
If you were relying on the previous value of the Name component on meshes, use the new GltfMeshName component instead.