bevy_text_mesh icon indicating copy to clipboard operation
bevy_text_mesh copied to clipboard

Updated to Bevy 0.13.0

Open nilsegger opened this issue 2 years ago • 0 comments

Hey, using this guide from bevy I updated this library to use bevy 0.13.0.

I ran the examples and they all seem to work.

Some observations that may hint to my changes being faulty:

When running I get the following message: Duplicate AssetLoader registered for Asset type bevy_text::font::Fontwith extensions["ttf"]. Loader must be specified in a .meta file in order to load assets of this type with these extensions.

For some reason now, even if mesh is Some, meshes.get_mut may return None, maybe this is connected to the above message.

if let Some(mesh) = mesh {
    if let Some(asset_mesh) = meshes.get_mut(mesh) {
        new_mesh = false;
        let ttf2_mesh =
            generate_text_mesh(&text_mesh, &mut font.ttf_font, Some(&mut cache));
        apply_mesh(ttf2_mesh, asset_mesh);
    }
}

I hope my changes are of some use. As said, the examples work at least, so for developing and testing it should be usable.

nilsegger avatar Mar 24 '24 12:03 nilsegger