


Plugin GUID: khundian.sod.uiscaler
Name: Shadows of Doubt UI Scaler
Version: 1.0.1
Description: UI scaler + configurable hotkeys.
Unifies UI scale via Canvas Scaler for Shadows of Doubt. Config hot-reload, configurable hotkeys (F9 toggle, F11/F10 ±5%), and safe per-canvas application. Keeps fonts/sprites crisp; world-space optional. Requires BepInEx 6 IL2CPP.
Scale With Screen Size) with configurable reference resolution (default 1920×1080), match factor (0–1), and a multiplier (0.10×–5.00×).SceneManager.GetActiveScene()), ensuring compatibility with IL2CPP/Roslyn edge-cases (no event subscription required).Canvas.ForceUpdateCanvases() is called once per rescan/revert pass to avoid spikes.Object.FindObjectsOfType<Canvas>(true), with filters:
ActiveSceneOnly (affect canvases in the active scene)IncludeWorldSpace (optional world-space canvases)Engine:RescanEveryMilliseconds, default 2000 ms). Heavier work runs on a timed tick; only input runs every frame.Install BepInEx 6 (IL2CPP) for the game.
Copy the plugin DLL to:
<GameFolder>\BepInEx\plugins\ShadowsOfDoubt.UIScaler\ShadowsOfDoubt.UIScaler.dll
Launch the game once. The config file will be created at:
<GameFolder>\BepInEx\config\khundian.sod.uiscaler.cfg
Zip structure:
BepInEx/
plugins/
ShadowsOfDoubt.UIScaler/
ShadowsOfDoubt.UIScaler.dll
manifest.json
README.md
LICENSE
trueUiScaleMultiplier = 1.00 (vanilla size)1920 × 10800.50 (balanced width/height)2000 msF9 (on/off)F11 (+5%)F10 (−5%)UI Scale: 1.15x).Location:
<GameFolder>\BepInEx\config\khundian.sod.uiscaler.cfg
The file includes a readable header and per-setting comments. Saving the file hot-reloads and re-applies settings while the game is running—no restart needed.
[General]
Enabled — master switch[CanvasScaler]
UiScaleMultiplier (0.10–5.00) — global UI size multiplier (1.00 = vanilla)ReferenceWidth / ReferenceHeight — reference resolution (default 1920×1080)MatchWidthOrHeight (0..1) — 0 = width, 1 = height, 0.5 = balanced[Filter]
ActiveSceneOnly — consider canvases only from active sceneIncludeWorldSpaceCanvases — include World Space canvases (default false)CanvasInclude / CanvasExclude — comma-separated name tokens; exclude wins over include[Perf]
RescanEveryMilliseconds — periodic re-scan to catch newly spawned canvases[Hotkeys] (names from Unity KeyCode)
Toggle (default F9)ScaleUp (default F11)ScaleDown (default F10)CanvasScaler set to Scale With Screen Size.UiScaleMultiplier by adjusting the reference resolution inversely (preserves pixel density).1.0.1 — 2025-08-23
UiDriver.Tick() using SceneManager.GetActiveScene() (compare name/buildIndex) and trigger a single rescan on change.Canvas.ForceUpdateCanvases() is now called once per rescan/revert pass (not per-canvas).Object.FindObjectsOfType<Canvas>(true) and filter by active scene, world-space inclusion, and name tokens.Update(); heavier work (rescans, reload debounce, heartbeat) runs on a timed Tick().[{PluginName}] from messages; rely on BepInEx’s [Level: Source] prefix.NameAllowed() uses cached arrays._originalById.SceneManager.activeSceneChanged to avoid IL2CPP/Roslyn edge cases; polling replaces it.ProfilerMarker.Auto() for Profiler.BeginSample/EndSample for broad IL2CPP/editor compatibility.float math for Mathf and double timestamps for scheduling.foreach (_originalById.ToArray()) with a reusable buffer to remove dead entries.EnsureCapacity for dictionaries/sets (no-op if unavailable).Verbose=true).1.0.0
Copyright (c) [2025] [Khundian]. All rights reserved.
You may redistribute this mod in its original, unmodified form.
You may not decompile, reverse engineer, modify, or distribute modified versions of this mod without prior written permission from the author.
This mod may not be used for commercial purposes or included in any paid mod packs or compilations.
The mod is provided "as is," without warranty of any kind. Use at your own risk.