Skip to content

Commit

Permalink
fix: use UNITY_2018_3_OR_NEWER instead of UNITY_2018_1_OR_NEWER
Browse files Browse the repository at this point in the history
  • Loading branch information
doyasu24 committed Jan 19, 2024
1 parent fbbba06 commit 4fe0861
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/UniTask/Assets/Plugins/UniTask/Runtime/IUniTaskSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public enum UniTaskStatus

// similar as IValueTaskSource
public interface IUniTaskSource
#if (!UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
: System.Threading.Tasks.Sources.IValueTaskSource
#pragma warning disable CS0108
#endif
Expand All @@ -30,7 +30,7 @@ public interface IUniTaskSource

UniTaskStatus UnsafeGetStatus(); // only for debug use.

#if (!UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
#pragma warning restore CS0108

System.Threading.Tasks.Sources.ValueTaskSourceStatus System.Threading.Tasks.Sources.IValueTaskSource.GetStatus(short token)
Expand All @@ -53,13 +53,13 @@ void System.Threading.Tasks.Sources.IValueTaskSource.OnCompleted(Action<object>
}

public interface IUniTaskSource<out T> : IUniTaskSource
#if (!UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
, System.Threading.Tasks.Sources.IValueTaskSource<T>
#endif
{
new T GetResult(short token);

#if (!UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0

new public UniTaskStatus GetStatus(short token)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER
#pragma warning disable 0649

using System;
Expand Down
4 changes: 2 additions & 2 deletions src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public UniTask<bool> SuppressCancellationThrow()
return new UniTask<bool>(new IsCanceledSource(source), token);
}

#if !UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER

public static implicit operator System.Threading.Tasks.ValueTask(in UniTask self)
{
Expand Down Expand Up @@ -440,7 +440,7 @@ public static implicit operator UniTask(UniTask<T> self)
return self.AsUniTask();
}

#if !UNITY_2018_1_OR_NEWER || UNITY_2021_2_OR_NEWER
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER

public static implicit operator System.Threading.Tasks.ValueTask<T>(in UniTask<T> self)
{
Expand Down

0 comments on commit 4fe0861

Please sign in to comment.