From da7e9fc4b362d0e6c0dcb3200795936fc401b3d7 Mon Sep 17 00:00:00 2001 From: neuecc Date: Sun, 24 May 2020 01:30:33 +0900 Subject: [PATCH] UniTask marked StructLayout(LayoutKind.Auto) --- src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs index 36d5b6e..f379324 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs @@ -1,13 +1,12 @@ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member #pragma warning disable CS0436 +using Cysharp.Threading.Tasks.CompilerServices; using System; -using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; -using Cysharp.Threading.Tasks.CompilerServices; -using Cysharp.Threading.Tasks.Internal; +using System.Runtime.InteropServices; namespace Cysharp.Threading.Tasks { @@ -26,6 +25,7 @@ namespace Cysharp.Threading.Tasks /// Lightweight unity specified task-like object. /// [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder))] + [StructLayout(LayoutKind.Auto)] public readonly partial struct UniTask { readonly IUniTaskSource source; @@ -353,6 +353,7 @@ namespace Cysharp.Threading.Tasks /// Lightweight unity specified task-like object. /// [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder<>))] + [StructLayout(LayoutKind.Auto)] public readonly struct UniTask { readonly IUniTaskSource source;