Skip to main content

DebugWidget

An abstract class in Root.Township, the global namespace.

Base for debug UI widgets that hide themselves unless enabled. Each picks an activation type: always on, toggled through SetActive (the QAM), or on when a DebugWidgets file is in the storage folder.

Constructors​

MemberWhat it is
protected DebugWidget()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private DebugWidget.ActivationType activationTypeHow this widget is turned on: always, by the QAM, or by the debug file.
private static HashSet<DebugWidget> awokenWidgetsAll widgets that have woken, for SetActive.
private static bool? hasWidgetFileCached result for HasWidgetFile.

Properties​

1 private and internal property
MemberWhat it is
private static bool HasWidgetFile { get; }Whether a DebugWidgets file exists in the storage folder; checked once.

Methods​

MemberWhat it is
static void SetActive(bool isActive)Shows or hides every widget set to QAM activation. Called by SceneWidgetsAction.
2 private and internal methods
MemberWhat it is
private void Awake()Registers the widget and hides it if it is QAM-only, or file-only with no DebugWidgets file.
private void OnDestroy()Removes the widget from the registered set.