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 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. ///