From 4e9d268d1cf8c3759936abc33c6a0ef7e477b33c Mon Sep 17 00:00:00 2001 From: neuecc Date: Wed, 6 May 2020 02:50:30 +0900 Subject: [PATCH] d --- .../AsyncUniTaskMethodBuilder.cs | 45 ++++++------------- .../AsyncUniTaskVoidMethodBuilder.cs | 15 +++---- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs b/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs index 320261e..2acad7e 100644 --- a/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs +++ b/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskMethodBuilder.cs @@ -137,29 +137,19 @@ namespace Cysharp.Threading.Tasks.CompilerServices } #if DEBUG || !UNITY_2018_3_OR_NEWER - - object id; - - // 9. For Debugger Attach - public object ObjectIdForDebugger + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger { get { - if (id == null) + if (debuggingId == null) { - id = new object(); + debuggingId = new object(); } - return id; - /* - if (promise == null) - { - promise = AutoResetUniTaskCompletionSource.Create(); - } - return promise; - */ + return debuggingId; } } - #endif } @@ -294,29 +284,20 @@ namespace Cysharp.Threading.Tasks.CompilerServices } #if DEBUG || !UNITY_2018_3_OR_NEWER - - object id; - - // 9. For Debugger Attach - public object ObjectIdForDebugger + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger { get { - if (id == null) + if (debuggingId == null) { - id = new object(); + debuggingId = new object(); } - return id; - /* - if (promise == null) - { - promise = AutoResetUniTaskCompletionSource.Create(); - } - return promise; - */ + return debuggingId; } } - #endif + } } \ No newline at end of file diff --git a/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs b/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs index 8ae9807..73cbabb 100644 --- a/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs +++ b/src/UniTask/Assets/Plugins/UniTask/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs @@ -102,22 +102,19 @@ namespace Cysharp.Threading.Tasks.CompilerServices } #if DEBUG || !UNITY_2018_3_OR_NEWER - - object id; - - // 9. For Debugger Attach - public object ObjectIdForDebugger + // Important for IDE debugger. + object debuggingId; + private object ObjectIdForDebugger { get { - if (id == null) + if (debuggingId == null) { - id = new object(); + debuggingId = new object(); } - return id; + return debuggingId; } } - #endif } }