From 109730eacd21a356b4c2cf4cf8e7c7ef4694ead0 Mon Sep 17 00:00:00 2001 From: "Ram.Type-0" Date: Sun, 30 Aug 2020 14:18:55 +0900 Subject: [PATCH] Add missing migration from previous one --- .../Addressables/AddressablesAsyncExtensions.cs | 14 ++++++++------ .../External/DOTween/DOTweenAsyncExtensions.cs | 3 ++- .../UniTask/Runtime/UnityAsyncExtensions.tt | 6 ++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs index 6424800..b46e85d 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/External/Addressables/AddressablesAsyncExtensions.cs @@ -13,7 +13,7 @@ namespace Cysharp.Threading.Tasks { public static class AddressablesAsyncExtensions { - #region AsyncOperationHandle +#region AsyncOperationHandle public static UniTask.Awaiter GetAwaiter(this AsyncOperationHandle handle) { @@ -94,7 +94,8 @@ namespace Cysharp.Threading.Tasks sealed class AsyncOperationHandleConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode { static TaskPool pool; - public AsyncOperationHandleConfiguredSource NextNode { get; set; } + AsyncOperationHandleConfiguredSource nextNode; + public ref AsyncOperationHandleConfiguredSource NextNode => ref nextNode; static AsyncOperationHandleConfiguredSource() { @@ -221,9 +222,9 @@ namespace Cysharp.Threading.Tasks } } - #endregion +#endregion - #region AsyncOperationHandle_T +#region AsyncOperationHandle_T public static UniTask.Awaiter GetAwaiter(this AsyncOperationHandle handle) { @@ -259,7 +260,8 @@ namespace Cysharp.Threading.Tasks sealed class AsyncOperationHandleConfiguredSource : IUniTaskSource, IPlayerLoopItem, ITaskPoolNode> { static TaskPool> pool; - public AsyncOperationHandleConfiguredSource NextNode { get; set; } + AsyncOperationHandleConfiguredSource nextNode; + public ref AsyncOperationHandleConfiguredSource NextNode => ref nextNode; static AsyncOperationHandleConfiguredSource() { @@ -391,7 +393,7 @@ namespace Cysharp.Threading.Tasks } } - #endregion +#endregion } } diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs index 7a75fe0..32f190e 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/External/DOTween/DOTweenAsyncExtensions.cs @@ -135,7 +135,8 @@ namespace Cysharp.Threading.Tasks sealed class TweenConfiguredSource : IUniTaskSource, ITaskPoolNode { static TaskPool pool; - public TweenConfiguredSource NextNode { get; set; } + TweenConfiguredSource nextNode; + public ref TweenConfiguredSource NextNode => ref nextNode; static TweenConfiguredSource() { diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.tt b/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.tt index 0aba600..9ebc356 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.tt +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.tt @@ -154,7 +154,8 @@ namespace Cysharp.Threading.Tasks sealed class <#= t.typeName #>WithCancellationSource : <#= ToIUniTaskSourceReturnType(t.returnType) #>, IPlayerLoopItem, ITaskPoolNode<<#= t.typeName #>WithCancellationSource> { static TaskPool<<#= t.typeName #>WithCancellationSource> pool; - public <#= t.typeName #>WithCancellationSource NextNode { get; set; } + <#= t.typeName #>WithCancellationSource nextNode; + public ref <#= t.typeName #>WithCancellationSource NextNode => ref nextNode; static <#= t.typeName #>WithCancellationSource() { @@ -297,7 +298,8 @@ namespace Cysharp.Threading.Tasks sealed class <#= t.typeName #>ConfiguredSource : <#= ToIUniTaskSourceReturnType(t.returnType) #>, IPlayerLoopItem, ITaskPoolNode<<#= t.typeName #>ConfiguredSource> { static TaskPool<<#= t.typeName #>ConfiguredSource> pool; - public <#= t.typeName #>ConfiguredSource NextNode { get; set; } + <#= t.typeName #>ConfiguredSource nextNode; + public ref <#= t.typeName #>ConfiguredSource NextNode => ref nextNode; static <#= t.typeName #>ConfiguredSource() {