Correct Burglin' Gnomes diagnosis: camera is ORTHOGRAPHIC
fieldOfView is meaningless here (reads 60 at every resolution because nothing uses it). The governing value is orthographicSize. Diagnostic now reports orthoSize plus computed visible width/height, and checks Cinemachine lens ortho size too. Also confirmed the HUD cause: CanvasScaler match=0.453 (width-biased) with a 1920x1080 reference, which balloons the HUD at 5120px wide. Added a live fix-test script to try match=1 and an orthoSize override in-game. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// LIVE FIX TEST — paste into UnityExplorer's C# Console while running at ultrawide.
|
||||
// Applies both candidate fixes immediately so you can see the result on screen.
|
||||
// Nothing is persisted: relaunching the game reverts everything.
|
||||
|
||||
var log = new System.Text.StringBuilder();
|
||||
|
||||
// ---- FIX 1: HUD scaling ----------------------------------------------------
|
||||
// CanvasScaler.matchWidthOrHeight: 0 = scale by WIDTH, 1 = scale by HEIGHT.
|
||||
// The game ships 0.453 (width-biased), which balloons the HUD at 5120px wide.
|
||||
// Matching HEIGHT keeps the HUD the same physical size as it is at 16:9.
|
||||
foreach (var cs in UnityEngine.Object.FindObjectsOfType<UnityEngine.UI.CanvasScaler>())
|
||||
{
|
||||
log.AppendLine($"UI {cs.name}: match {cs.matchWidthOrHeight} -> 1.0");
|
||||
cs.matchWidthOrHeight = 1f;
|
||||
}
|
||||
|
||||
// ---- FIX 2: orthographic view width ---------------------------------------
|
||||
// For an ortho camera, visible height = 2*orthographicSize and width follows
|
||||
// aspect. If the game shrank orthographicSize at ultrawide, restoring the 16:9
|
||||
// value gives back the vertical view (true Hor+).
|
||||
// Set TARGET_ORTHO to the size you measured at 1920x1080; leave null to only report.
|
||||
float? TARGET_ORTHO = null; // e.g. 5.5f
|
||||
|
||||
foreach (var c in UnityEngine.Object.FindObjectsOfType<UnityEngine.Camera>())
|
||||
{
|
||||
if (!c.orthographic) continue;
|
||||
log.AppendLine($"CAM {c.name}: orthoSize={c.orthographicSize:F4} aspect={c.aspect:F4} " +
|
||||
$"visibleW={2f * c.orthographicSize * c.aspect:F3} visibleH={2f * c.orthographicSize:F3}");
|
||||
if (TARGET_ORTHO.HasValue)
|
||||
{
|
||||
c.orthographicSize = TARGET_ORTHO.Value;
|
||||
log.AppendLine($" -> forced orthoSize={TARGET_ORTHO.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
UnityExplorer.ExplorerCore.Log(log.ToString());
|
||||
Reference in New Issue
Block a user