diff --git a/GDTask.csproj b/GDTask.csproj index 198256e..d7de074 100644 --- a/GDTask.csproj +++ b/GDTask.csproj @@ -1,4 +1,4 @@ - + net6.0 net7.0 diff --git a/GDTask.sln b/GDTask.sln index b9b0bc8..32b0ad3 100644 --- a/GDTask.sln +++ b/GDTask.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{CEF6A453-1034-46B7-9617-C94E19891B46}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,11 +9,11 @@ Global ExportRelease|Any CPU = ExportRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU - {2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU EndGlobalSection EndGlobal diff --git a/addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs b/addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs index 83d57fa..1566d91 100644 --- a/addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs +++ b/addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs @@ -39,12 +39,7 @@ public void SetException(Exception exception) // runner is finished, return first. if (runner != null) { -#if ENABLE_IL2CPP - // workaround for IL2CPP bug. - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction); -#else runner.Return(); -#endif runner = null; } @@ -59,12 +54,7 @@ public void SetResult() // runner is finished, return. if (runner != null) { -#if ENABLE_IL2CPP - // workaround for IL2CPP bug. - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction); -#else runner.Return(); -#endif runner = null; } } diff --git a/addons/GDTask/CompilerServices/StateMachineRunner.cs b/addons/GDTask/CompilerServices/StateMachineRunner.cs index 1361195..e96b71b 100644 --- a/addons/GDTask/CompilerServices/StateMachineRunner.cs +++ b/addons/GDTask/CompilerServices/StateMachineRunner.cs @@ -1,8 +1,8 @@ #pragma warning disable CS1591 using System; -using System.Linq; using System.Diagnostics; +using System.Linq; using System.Runtime.CompilerServices; namespace Fractural.Tasks.CompilerServices @@ -56,9 +56,6 @@ internal sealed class AsyncGDTaskVoid : IStateMachineRunner, ITas public AsyncGDTaskVoid() { MoveNext = Run; -#if ENABLE_IL2CPP - ReturnAction = Return; -#endif } public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunner runnerFieldRef) @@ -120,10 +117,6 @@ internal sealed class AsyncGDTask : IStateMachineRunnerPromise, I where TStateMachine : IAsyncStateMachine { static TaskPool> pool; - -#if ENABLE_IL2CPP - readonly Action returnDelegate; -#endif public Action MoveNext { get; } TStateMachine stateMachine; @@ -132,9 +125,6 @@ internal sealed class AsyncGDTask : IStateMachineRunnerPromise, I AsyncGDTask() { MoveNext = Run; -#if ENABLE_IL2CPP - returnDelegate = Return; -#endif } public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef) @@ -210,12 +200,7 @@ public void GetResult(short token) } finally { -#if ENABLE_IL2CPP - // workaround for IL2CPP bug. - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate); -#else TryReturn(); -#endif } } @@ -243,10 +228,6 @@ internal sealed class AsyncGDTask : IStateMachineRunnerPromise { static TaskPool> pool; -#if ENABLE_IL2CPP - readonly Action returnDelegate; -#endif - public Action MoveNext { get; } TStateMachine stateMachine; @@ -255,9 +236,6 @@ internal sealed class AsyncGDTask : IStateMachineRunnerPromise AsyncGDTask() { MoveNext = Run; -#if ENABLE_IL2CPP - returnDelegate = Return; -#endif } public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef) @@ -333,12 +311,7 @@ public T GetResult(short token) } finally { -#if ENABLE_IL2CPP - // workaround for IL2CPP bug. - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate); -#else TryReturn(); -#endif } } diff --git a/tests/manual/Test.tscn b/tests/manual/Test.tscn index da6327e..ea67b9e 100644 --- a/tests/manual/Test.tscn +++ b/tests/manual/Test.tscn @@ -5,7 +5,6 @@ [node name="Test" type="Node2D"] script = ExtResource("1") -runTestOnReady = true spritePath = NodePath("Sprite2D") [node name="Sprite2D" type="Sprite2D" parent="."]