From ed2e0016bac01b99d05b40a74c5e83f512225376 Mon Sep 17 00:00:00 2001 From: ckoch Date: Tue, 21 Jul 2026 16:25:27 -0400 Subject: [PATCH] Plugin: never cache a zero baseline for world-space canvases The in-game log showed 'World Canvas localScale (0,0,0) -> (0,0,0)'. Games hide world-space UI by zeroing its scale; if that zero got cached as the baseline, multiplying it would pin the canvas to zero permanently and the UI could never reappear. Now skips canvases that are currently zeroed - both when capturing the baseline and when applying - so hidden UI is left alone and picked up once the game shows it again. Co-Authored-By: Claude Opus 4.8 --- games/BurglinGnomes/plugin/UltraWideFix.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/games/BurglinGnomes/plugin/UltraWideFix.cs b/games/BurglinGnomes/plugin/UltraWideFix.cs index fc260e7..24e29e9 100644 --- a/games/BurglinGnomes/plugin/UltraWideFix.cs +++ b/games/BurglinGnomes/plugin/UltraWideFix.cs @@ -125,11 +125,20 @@ namespace BurglinGnomes.UltraWideFix if (canvas.renderMode == RenderMode.WorldSpace) { if (Mathf.Approximately(_worldScale.Value, 1f)) continue; + + var cur = cs.transform.localScale; + // Games hide world-space UI by zeroing its scale. Never cache a + // zero baseline: if we did, multiplying it would pin the canvas + // to zero forever and the UI could never reappear. if (!_scaleBaseline.TryGetValue(id, out var base3)) { - base3 = cs.transform.localScale; + if (cur.x <= 0.0001f) continue; // hidden right now; revisit later + base3 = cur; _scaleBaseline[id] = base3; } + // Respect the game hiding it: leave zeroed canvases alone. + if (cur.x <= 0.0001f) continue; + var want = base3 * _worldScale.Value; if (cs.transform.localScale != want) {