Fix DebugOverlay.Text not rendering#82
Closed
andy013 wants to merge 3 commits intoFacepunch:masterfrom
Closed
Conversation
handsomematt
approved these changes
Dec 4, 2025
Contributor
|
This PR has been merged upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think the native renderer culls objects with uninitialised transform data. Even though
DebugOverlay.Textdoesn't need a transform, it still has to be set to zero explicitly to get it to render.[EDIT] Actually, looking at it again, I think it's setting LocalBounds here that's causing the issue:
sbox-public/engine/Sandbox.Engine/Scene/GameObjectSystems/DebugOverlay/DebugOverlaySystem.DrawText.cs
Lines 25 to 29 in 5936916
It uses Transform in it's setter:
sbox-public/engine/Sandbox.Engine/Systems/SceneSystem/SceneObject.cs
Line 202 in 5936916
If the Transform isn't initialised then I think the scale will default to 0 and so nothing will render.
I'm not sure if I'm initialising the Transform in the right place. I guess it's easy enough for you to move now you know what's causing the bug.