Commit Graph

3 Commits

Author SHA1 Message Date
kronic 150f30f56c Fix: PixelArtDevControls is opt-in — it was running OnGUI in Game.unity every frame
The editor-only pixel-art tuner self-spawned via [RuntimeInitializeOnLoadMethod] +
DontDestroyOnLoad into EVERY scene, not just DevSandbox, and its OnGUI draws the
toggle button on every IMGUI pass BEFORE the `!_open` early-out. IMGUI dispatches
at least Layout+Repaint per frame, so it allocated continuously during normal
gameplay — it is a MonoBehaviour, so an ECS system-toggle sweep never touched it,
and it dominated this session's allocation profiling until it was found.

Now gated behind an EditorPrefs opt-in with a checked menu toggle, mirroring
`ProjectM/Boot Into Menu (Editor)`. Off by default.

Separately: because the object carries HideFlags.DontSave it SURVIVES play-mode
exit while the static _instance does not, so the old code leaked one instance per
domain reload — two live strays were found and cleared in the editor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 23:03:15 -07:00
kronic a4b6bb9dfe Console noise purge: deprecated-API fixes + PixelArtDevControls legacy-Input exception
MenuUi FindAnyObjectByType; GA prefabAssetPath->assetPath x2; Synty sample
FindObjectsByType overload; dead death_b field removed. Real bug caught by
the sweep: the F3 pixel-art toggle used legacy Input.GetKeyDown under
Input System-only handling -> InvalidOperationException every frame in Play.
Suite green (455).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 22:00:16 -07:00
kronic cc2e7ad95e Polishes 2026-07-07 20:51:18 -07:00