Table of Contents

Class ToggleableModuleConfig

Namespace
Titipi.MocaLib2

Base class for configs of leaf SDK modules that support a runtime kill-switch. Foundational modules others depend on (Firebase, which bootstraps Remote Config; Network, a dependency of IAP) extend MocaLib2ModuleConfig directly and are never gated off.

public abstract class ToggleableModuleConfig : MocaLib2ModuleConfig
Inheritance
ToggleableModuleConfig
Derived
Inherited Members

Fields

Enabled

Runtime kill-switch, controllable only from Remote Config — deliberately hidden from the Inspector so it isn't a per-asset developer knob. A module that's compiled in and enabled via MocaLib2Config defaults to true and runs normally; a Remote Config override for this config's RemoteConfigKey that sets {"enabled": false} makes the module's InitializeAsync return false without starting the SDK (and its methods then no-op). Callers just call InitializeAsync unconditionally — the check lives inside the module. Hidden but serialized, so Resolve<T>(T, string)'s JSON overlay can still write it.