Skip to content

Truncated text in tracked values. #28

Open
@piotrmuzolf

Description

@piotrmuzolf

Sometimes text is truncated due to not enough space for whole text to appear in some of the tracked values. It happens in unity 2023 and 6.0, didn't seem to happen before that. I believe reason for that is that something changed in Unity 2023+ with UnityEngine.GUIStyle.CalcSize() method and is no longer giving proper value. To fix that issue all you have to do is add 1 extra pixel in width of calculated size and issue is gone.

I fixed that locally for myself by adding field:
private readonly Vector2 extraTextSize = new Vector2(1, 0);

And then applying it to 4 textDimensions fields inside MonitoringUIFallback e.g.:
var textDimensions = ctx.Style.CalcSize(_content) + extraTextSize;

Issue:
image

After fix:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions