diff --git a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs b/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs index 56d04e49..8bbbc8ac 100644 --- a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs +++ b/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs @@ -1,4 +1,4 @@ -#if (NET_4_6 || NET_STANDARD_2_0) +#if CSHARP_7_OR_LATER #pragma warning disable CS1591 using System.Runtime.CompilerServices; diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs index 73a7e850..9f736355 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs @@ -1,6 +1,6 @@ using System; using System.Threading; -#if (NET_4_6 || NET_STANDARD_2_0) +#if CSHARP_7_OR_LATER using UniRx.Async; #endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs index 233b8e93..909e54dc 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs @@ -4,7 +4,7 @@ #if !UniRxLibrary using UnityEngine; #endif -#if (NET_4_6 || NET_STANDARD_2_0) +#if CSHARP_7_OR_LATER using UniRx.Async; #endif diff --git a/Assets/Scripts/Tests/_AsyncTest.cs b/Assets/Scripts/Tests/_AsyncTest.cs index 8a3b9867..4343609d 100644 --- a/Assets/Scripts/Tests/_AsyncTest.cs +++ b/Assets/Scripts/Tests/_AsyncTest.cs @@ -27,6 +27,7 @@ namespace UniRx.Tests public class _AsyncTest { #if CSHARP_7_OR_LATER +#if !UNITY_WSA public struct MyJob : IJob { @@ -167,6 +168,7 @@ public async UniTask WaitUntilValueChanged() diff.Is(11); } + public async UniTask SwitchTo() { var currentThreadId = Thread.CurrentThread.ManagedThreadId; @@ -221,6 +223,8 @@ public async UniTask AwaitableReactiveCommand() v.Is(100); } + + IEnumerator ToaruCoroutineEnumerator() { yield return null; @@ -290,3 +294,5 @@ public async Task GetTextAsync(string path) } #endif + +#endif \ No newline at end of file