Game.Debug.UIDebugUI
Assembly:
Assembly-CSharp (game assembly)
Namespace:
Game.Debug
Type:
Class
Base:
System.Object
Summary:
Debug container class that builds the "UI" debug tab for inspecting the game's UI manager (UIManager) state. It enumerates UISystems and their UIViews, exposes counts for static/dynamic user images, provides actions (e.g., clear cached images, refresh debug view), and — when enabled — shows UI memory metrics using UnityPlugin. The class is discovered by the debug system via the [DebugContainer] attribute and exposes a tab via the [DebugTab("UI", -965)] attribute on its builder method.
Fields
None
This class declares no explicit fields. All functionality is provided via the single private static builder method.
Properties
None
No properties are declared on this class.
Constructors
public UIDebugUI()
The default public parameterless constructor is implicit (no explicit constructor defined in source).
Methods
private static System.Collections.Generic.List<DebugUI.Widget> BuildUIBindingsDebugUI()
This is the single method in the class and is annotated with [DebugTab("UI", -965)]. It is used by the debug system to produce the list of widgets that will be shown in the "UI" debug tab.
Detailed behavior:
- Creates a top-level foldout "UI Manager".
- Iterates through UIManager.UISystems and for each UISystem:
- Creates a foldout labeled "UISystem #
Notes:
- The returned List
Usage Example
// The debug system discovers this class via [DebugContainer] and uses the method
// annotated with [DebugTab("UI", -965)] to populate the "UI" tab automatically.
// The class itself is minimal; the important part is the builder method:
[DebugContainer]
public class UIDebugUI
{
[DebugTab("UI", -965)]
private static List<DebugUI.Widget> BuildUIBindingsDebugUI()
{
// build and return the list of debug widgets (see docs above)
}
}
// The provided UI already includes a "Refresh" button which calls:
DebugSystem.Rebuild(BuildUIBindingsDebugUI);
// When memory tracking is enabled (UIManager.instance.enableMemoryTracking),
// the debug UI shows memory statistics obtained via UnityPlugin.Instance.
Additional notes: - Intended for modding/debugging only — do not rely on these internals for production game logic or mods that must be compatible across major game updates. - The builder uses game internal types; ensure your mod references the same game assembly versions to avoid compatibility issues.