Skip to content

Fix: decouple TextRender editor bounds from material readiness#4137

Draft
ifromstone wants to merge 1 commit into
FlaxEngine:masterfrom
ifromstone:dev/TextRenderBoundsFix
Draft

Fix: decouple TextRender editor bounds from material readiness#4137
ifromstone wants to merge 1 commit into
FlaxEngine:masterfrom
ifromstone:dev/TextRenderBoundsFix

Conversation

@ifromstone

Copy link
Copy Markdown
Contributor

Problem

TextRender editor bounds could be stale during prefab preview initialization. In prefab windows, this could make auto-fit run before text bounds were valid, so the same prefab appeared framed differently from a scene instance.

Solution

  • Add a bounds-only update path for TextRender.
  • Track bounds dirtiness separately from draw-data dirtiness.
  • Keep HasContentLoaded() aligned with other actor types by checking asset load state, not material shader readiness.
  • Make GetEditorBox(), GetLocalBox(), debug drawing, and intersection code refresh bounds when needed.
  • Add a precise-hit-test fallback to bounding-box intersection when the collision proxy has not been built yet.
  • Restrict prefab auto-fit waiting to content that can affect editor bounds, instead of overriding generic preview asset readiness.

Split `TextRender` bounds calculation from full draw-data generation so editor bounds can be updated as soon as the font and text data are available, without waiting for the material shader to be ready.
@ifromstone ifromstone marked this pull request as draft June 3, 2026 17:25
@mafiesto4 mafiesto4 added enhancement New feature or request editor graphics labels Jun 4, 2026
@mafiesto4 mafiesto4 added this to the 1.13 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor enhancement New feature or request graphics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants