A class in Root.Township, the global namespace.
Tracks whether the game window has input focus and raises static events when it changes. MenuSettings.isAlwaysOnFocus forces it to count as focused.
Constructors
| Member | What it is |
|---|
EditorFakeFocusEvents() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
static bool hasInputFocus | Whether the window currently has input focus. |
Events
| Member | What it is |
|---|
static event Action InputFocusAcquired | Raised when the window gains focus. |
static event Action InputFocusLost | Raised when the window loses focus. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void Awake() | Sets hasInputFocus from the application's focus state. |
private void OnApplicationFocus(bool focus) | Updates hasInputFocus and raises the matching event. |