From 4d583a9bb5757d2c05d0940b4d08db1a4207288f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Thu, 22 Jan 2026 15:26:37 +1100 Subject: [PATCH 1/2] auto-claude: subtask-1-1 - Convert record struct to struct Convert record struct declarations to regular struct declarations to fix CS8773 compilation errors. Record struct is a C# 10 feature that may not be available in the target C# version. Changes: - JActionTask.cs: internal record struct -> internal struct - JActionRunner.cs: private record struct JActionUpdate -> private struct - JActionAwaitable.cs: public readonly record struct -> public readonly struct with explicit fields and constructors for JActionAwaitable and JActionAwaiter Co-Authored-By: Claude Opus 4.5 --- .../Runtime/Internal/JActionRunner.cs | 2 +- .../Runtime/Internal/JActionTask.cs | 2 +- .../Runtime/JActionAwaitable.cs | 24 +++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionRunner.cs b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionRunner.cs index 77ab83dd..3a3e46b4 100644 --- a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionRunner.cs +++ b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionRunner.cs @@ -41,7 +41,7 @@ internal static class JActionRunner /// /// Marker struct for identifying our update in the PlayerLoop. /// - private record struct JActionUpdate; + private struct JActionUpdate { } #if UNITY_EDITOR [InitializeOnLoadMethod] diff --git a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionTask.cs b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionTask.cs index d2b5bd14..fb2a12e8 100644 --- a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionTask.cs +++ b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/Internal/JActionTask.cs @@ -41,7 +41,7 @@ internal enum JActionTaskType : byte /// This struct is designed for minimal memory footprint and efficient execution. /// State is stored externally via to avoid boxing value types. /// - internal record struct JActionTask + internal struct JActionTask { /// The type of task operation. internal JActionTaskType Type; diff --git a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/JActionAwaitable.cs b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/JActionAwaitable.cs index 2db0fd68..ee9ce48f 100644 --- a/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/JActionAwaitable.cs +++ b/UnityProject/Packages/com.jasonxudeveloper.jengine.util/Runtime/JActionAwaitable.cs @@ -21,8 +21,18 @@ namespace JEngine.Util /// for proper compiler warnings when not awaited. /// /// - public readonly record struct JActionAwaitable(JAction Action) + public readonly struct JActionAwaitable { + /// The JAction instance being awaited. + public readonly JAction Action; + + /// + /// Initializes a new instance of the struct. + /// + /// The JAction to await. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public JActionAwaitable(JAction action) => Action = action; + /// /// Gets the awaiter for this awaitable. /// @@ -39,8 +49,18 @@ public readonly record struct JActionAwaitable(JAction Action) /// This struct implements to support /// both regular and unsafe continuations, enabling efficient async state machine behavior. /// - public readonly record struct JActionAwaiter(JAction Action) : ICriticalNotifyCompletion + public readonly struct JActionAwaiter : ICriticalNotifyCompletion { + /// The JAction instance being awaited. + public readonly JAction Action; + + /// + /// Initializes a new instance of the struct. + /// + /// The JAction to await. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public JActionAwaiter(JAction action) => Action = action; + /// /// Gets whether the has completed execution. /// From b64a6b6b92ea57d3b959cab207f87f2a7745dbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Thu, 22 Jan 2026 15:27:41 +1100 Subject: [PATCH 2/2] auto-claude: subtask-1-2 - Wrap TestRunnerCallbacks.cs in #if UNITY_INCLUDE_TESTS Wrapped entire TestRunnerCallbacks.cs file in conditional compilation directive to fix CS0234/CS0246 errors when Unity Test Framework is not included in the project. Co-Authored-By: Claude Opus 4.5 --- .../Editor/Misc/TestRunnerCallbacks.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/Misc/TestRunnerCallbacks.cs b/UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/Misc/TestRunnerCallbacks.cs index 2b3fc30c..680580c0 100644 --- a/UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/Misc/TestRunnerCallbacks.cs +++ b/UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/Misc/TestRunnerCallbacks.cs @@ -1,3 +1,4 @@ +#if UNITY_INCLUDE_TESTS using UnityEditor; using UnityEditor.TestTools.TestRunner.Api; using UnityEngine; @@ -73,3 +74,4 @@ public void TestStarted(ITestAdaptor test) { } public void TestFinished(ITestResultAdaptor result) { } } } +#endif