From ebd80243e0a7ada3cb0ab17ee3e724d0c547db24 Mon Sep 17 00:00:00 2001 From: neuecc Date: Fri, 5 Jun 2020 00:43:54 +0900 Subject: [PATCH] Fix UniTask.ReturnToCurrentSynchronizationContext --- src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs index 65d548c..8077f60 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Threading.cs @@ -351,6 +351,8 @@ namespace Cysharp.Threading.Tasks { get { + if (!dontPostWhenSameContext) return false; + var current = SynchronizationContext.Current; if (current == synchronizationContext) {