Skip to content

Conversation

@ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Nov 20, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text Gizmos

1 participant