bevy/crates/bevy_gltf/src
Patrick Walton 05a35f6f48
Add GltfLoader::new. (#9120)
# Objective

In my application, I'm manually wrapping the built-in Bevy loaders with
a wrapper loader that stores some metadata before calling into the inner
Bevy loader. This worked for the glTF loader in Bevy 0.10, but in Bevy
0.11 it became impossible to do this because the glTF loader became
unconstructible outside Bevy due to the new private fields within it.
It's now in fact impossible to get a reference to a GltfLoader at all
from outside Bevy, because the only way to construct a GltfLoader is to
add the GltfPlugin to an App, and the GltfPlugin only hands out
references to its GltfLoader to the asset server, which provides no
public access to the loaders it manages.

## Solution

This commit fixes the problem by adding a public `new` method to allow
manual construction of a glTF loader.

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2023-07-13 23:54:59 +00:00
..
lib.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
loader.rs Add GltfLoader::new. (#9120) 2023-07-13 23:54:59 +00:00
vertex_attributes.rs Add support for custom glTF vertex attributes. (#5370) 2023-04-24 14:20:13 +00:00