Skip to content
Discussion options

You must be logged in to vote

You may want to check out the TextureAtlasBuilder.

Specifically, the merging happens here:

let mut texture_atlas_builder = TextureAtlasBuilder::default();
for handle in rpg_sprite_handles.handles.iter() {
let texture = textures.get(handle).unwrap();
texture_atlas_builder.add_texture(handle.clone_weak().typed::<Texture>(), texture);
}
let texture_atlas = texture_atlas_builder.finish(&mut textures).unwrap();

And it can be used to create a texture of textures, so to speak

Replies: 1 comment 2 replies

Comment options

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

@MrGVSV
Comment options

MrGVSV Nov 30, 2021
Collaborator

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