Property IsMainThread
IsMainThread
True when the caller runs on Unity's main thread — Unity installs a
UnitySynchronizationContext there, and that is what makes await continuations come back to
the main thread instead of the thread pool.
public static bool IsMainThread { get; }