Skip to content
Discussion options

You must be logged in to vote

You can look at how the gltf loader works.

It loads a struct that contains other handles:

pub struct Gltf {
pub scenes: Vec<Handle<Scene>>,
pub named_scenes: HashMap<String, Handle<Scene>>,

for examples, for materials, it first loads all the textures with load_context.get_handle, and keeps the handles:

fn load_material(material: &Material, load_context: &mut LoadContext) -> Handle<StandardMaterial> {
let material_label = material_label(&material);
let pbr = material.pbr_metallic_roughness();
let mut dependencies = V…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@zicklag
Comment options

zicklag Jan 25, 2021
Collaborator Author

@inodentry
Comment options

Comment options

You must be logged in to vote
3 replies
@zicklag
Comment options

zicklag Jan 31, 2021
Collaborator Author

@mockersf
Comment options

@zicklag
Comment options

zicklag Jan 31, 2021
Collaborator Author

Answer selected by zicklag
Comment options

You must be logged in to vote
3 replies
@zicklag
Comment options

zicklag Nov 20, 2023
Collaborator Author

@nicopap
Comment options

nicopap Nov 20, 2023
Collaborator

@fantasyRqg
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants