Skip to main content

UnityApplicationWrapper

A class in Root.Township, Features.Utility.UnityWrappers.

Thin wrapper over UnityEngine.Application so code can be tested with a fake. Use the static Instance.

Constructors​

MemberWhat it is
UnityApplicationWrapper()Creates an UnityApplicationWrapper with default values.

Fields​

1 private and internal field
MemberWhat it is
private static IUnityApplicationWrapper instanceBacking field for Instance.

Properties​

MemberWhat it is
static IUnityApplicationWrapper Instance { get; }The shared wrapper, created on first use unless overridden.
bool IsEditor { get; }Whether the game is running in the Unity editor.

Methods​

1 private and internal method
MemberWhat it is
private void Features.Utility.UnityWrappers.ITestUnityApplicationWrapper.OverrideInstance(IUnityApplicationWrapper wrapper)Replaces the shared instance; reach it by casting to ITestUnityApplicationWrapper.