Skip to content

Commit 783d9ba

Browse files
committed
Address feedback
1 parent 8289947 commit 783d9ba

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Assets/MRTK/Core/Utilities/Async/AwaiterExtensions.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ private static void RunOnUnityScheduler(Action action)
141141
{
142142
if (SynchronizationContext.Current == SyncContextUtility.UnitySynchronizationContext)
143143
{
144-
// Take the opportunity to ensure AsyncCoroutineRunner is running when we are on the Unity thread
145-
if (!AsyncCoroutineRunner.IsInstanceRunning)
146-
{
147-
var _ = AsyncCoroutineRunner.Instance;
148-
}
149144
action();
150145
}
151146
else

Assets/MRTK/Core/Utilities/Async/Internal/AsyncCoroutineRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private void OnDisable()
161161
}
162162
}
163163

164-
private void Awake()
164+
private void OnEnable()
165165
{
166166
Debug.Assert(Instance == this, "[AsyncCoroutineRunner] There should only be one AsyncCoroutineRunner in the scene.");
167167
isInstanceRunning = true;

0 commit comments

Comments
 (0)