Skip to main content

GlobalSettings<TConcrete, TInterface>

A class in Alta.Global.Runtime, Alta.Global.

Variant of GlobalSettings that exposes its instance through an interface. Nothing in this build derives from it.

Constructors​

MemberWhat it is
GlobalSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private static TConcrete instanceThe stored instance.
private static TInterface mockOverrideMock set by SetMock; unused.
private static int startedCountUnused.

Properties​

MemberWhat it is
static TInterface Instance { get; }The instance cast to the interface. Ignores any mock set with SetMock.

Methods​

MemberWhat it is
sealed override void InitializeInstance()Stores this asset as the instance.
static void SetMock(TInterface mock)Stores a mock, but Instance never reads it.