bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Text gizmos

Open ickshonpe opened this issue 1 month ago • 1 comments

Objective

Add naive support for text gizmos.

Draw a label at a given point using the default font. 2d only, no rich text support, no anchors, no rotation.

Fixes #16490

Solution

I'm not familiar with the gizmos implementation, so my plan is to hack together something limited that just about works, and then hand it over to a rendering SME or someone to push over the line.

Done

  • Added a text_2d method to the Gizmos SystemParam that adds text gizmos for rendering to a GizmoTextBuffer resource.
  • In post update, gizmo_text_system does text layout for each text gizmo queued in the GizmoTextBuffer and adds the resulting glyph geometry to the GizmoBuffer.

Todo

  • Rendering isn't implemented yet, need to implement some sort of TextGizmoPipeline in bevy_gizmos_render.
  • I started off by adding a text_gizmos feature-gate, but it overcomplicated things at this stage, so removed it for now. I'll add it back at the end.

ickshonpe avatar Nov 20 '25 11:11 ickshonpe

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

github-actions[bot] avatar Dec 03 '25 06:12 github-actions[bot]