Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit bcac2f2

Browse files
committed
fix can't compile in regular Unity(C# 6.0) #328
1 parent 4001368 commit bcac2f2

17 files changed

+41
-23
lines changed

Assembly-CSharp-firstpass-vs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
<PropertyGroup>
380380
<IncrementalCompiler>true</IncrementalCompiler>
381381
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
382-
<DocumentationFile>41588</DocumentationFile>
382+
<DocumentationFile>5746</DocumentationFile>
383383
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
384384
</PropertyGroup>
385385
</Project>

Assembly-CSharp-firstpass.Player.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@
896896
<PropertyGroup>
897897
<IncrementalCompiler>true</IncrementalCompiler>
898898
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
899-
<DocumentationFile>41588</DocumentationFile>
899+
<DocumentationFile>5746</DocumentationFile>
900900
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
901901
</PropertyGroup>
902902
</Project>

Assembly-CSharp-firstpass.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@
676676
<PropertyGroup>
677677
<IncrementalCompiler>true</IncrementalCompiler>
678678
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
679-
<DocumentationFile>41588</DocumentationFile>
679+
<DocumentationFile>5746</DocumentationFile>
680680
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
681681
</PropertyGroup>
682682
</Project>

Assembly-CSharp-vs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<PropertyGroup>
8484
<IncrementalCompiler>true</IncrementalCompiler>
8585
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
86-
<DocumentationFile>41588</DocumentationFile>
86+
<DocumentationFile>5746</DocumentationFile>
8787
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
8888
</PropertyGroup>
8989
</Project>

Assembly-CSharp.Player.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@
910910
<PropertyGroup>
911911
<IncrementalCompiler>true</IncrementalCompiler>
912912
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
913-
<DocumentationFile>41588</DocumentationFile>
913+
<DocumentationFile>5746</DocumentationFile>
914914
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
915915
</PropertyGroup>
916916
</Project>

Assembly-CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@
680680
<PropertyGroup>
681681
<IncrementalCompiler>true</IncrementalCompiler>
682682
<CscToolPath>C:\Users\neuecc\AppData\Local\Unity\cache\packages\packages.unity.com\[email protected]\.bin</CscToolPath>
683-
<DocumentationFile>41588</DocumentationFile>
683+
<DocumentationFile>5746</DocumentationFile>
684684
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
685685
</PropertyGroup>
686686
</Project>

Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if (NET_4_6 || NET_STANDARD_2_0) && UNITY_2018_1_OR_NEWER
1+
#if CSHARP_7_OR_LATER
22
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
33

44
using System;

Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_2018_1_OR_NEWER && (NET_4_6 || NET_STANDARD_2_0 || CSHARP_7_OR_LATER) && !UNITY_WSA
1+
#if CSHARP_7_OR_LATER
22
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
33

44
using System;

Assets/Scripts/RuntimeUnitTestToolkit/UnitTest.unity

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ RectTransform:
511511
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
512512
m_AnchorMin: {x: 0, y: 1}
513513
m_AnchorMax: {x: 0, y: 1}
514-
m_AnchoredPosition: {x: 207.25, y: -634.5}
515-
m_SizeDelta: {x: 414.5, y: 1269}
514+
m_AnchoredPosition: {x: 198, y: -400}
515+
m_SizeDelta: {x: 396, y: 800}
516516
m_Pivot: {x: 0.5, y: 0.5}
517517
--- !u!114 &1264454900
518518
MonoBehaviour:
@@ -587,8 +587,8 @@ RectTransform:
587587
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
588588
m_AnchorMin: {x: 0, y: 1}
589589
m_AnchorMax: {x: 0, y: 1}
590-
m_AnchoredPosition: {x: 202.25, y: -30}
591-
m_SizeDelta: {x: 384.5, y: 40}
590+
m_AnchoredPosition: {x: 193, y: -30}
591+
m_SizeDelta: {x: 366, y: 40}
592592
m_Pivot: {x: 0.5, y: 0.5}
593593
--- !u!114 &1337584758
594594
MonoBehaviour:
@@ -925,7 +925,7 @@ RectTransform:
925925
m_AnchorMin: {x: 0, y: 0}
926926
m_AnchorMax: {x: 1, y: 1}
927927
m_AnchoredPosition: {x: 15, y: 0}
928-
m_SizeDelta: {x: -15, y: -1242}
928+
m_SizeDelta: {x: -15, y: -773}
929929
m_Pivot: {x: 0, y: 1}
930930
--- !u!114 &1607029148
931931
MonoBehaviour:
@@ -1108,7 +1108,7 @@ RectTransform:
11081108
m_AnchorMin: {x: 0, y: 0}
11091109
m_AnchorMax: {x: 1, y: 1}
11101110
m_AnchoredPosition: {x: 0, y: 0}
1111-
m_SizeDelta: {x: 0, y: -1209}
1111+
m_SizeDelta: {x: 0, y: -740}
11121112
m_Pivot: {x: 0, y: 1}
11131113
--- !u!114 &1903152287
11141114
MonoBehaviour:
@@ -1187,8 +1187,8 @@ RectTransform:
11871187
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
11881188
m_AnchorMin: {x: 0, y: 1}
11891189
m_AnchorMax: {x: 0, y: 1}
1190-
m_AnchoredPosition: {x: 631.75, y: -634.5}
1191-
m_SizeDelta: {x: 414.5, y: 1269}
1190+
m_AnchoredPosition: {x: 604, y: -400}
1191+
m_SizeDelta: {x: 396, y: 800}
11921192
m_Pivot: {x: 0.5, y: 0.5}
11931193
--- !u!114 &2044738991
11941194
MonoBehaviour:

Assets/Scripts/Tests/_AsyncTest.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,24 @@ public async UniTask ExceptionlessCancellation()
240240
canceled.IsTrue();
241241
}
242242

243+
public async UniTask ExceptionCancellation()
244+
{
245+
var cts = new CancellationTokenSource();
246+
247+
UniTask.DelayFrame(10).ContinueWith(_ => cts.Cancel()).Forget();
248+
249+
bool occur = false;
250+
try
251+
{
252+
var value = await UniTask.DelayFrame(100, cancellationToken: cts.Token);
253+
}
254+
catch (OperationCanceledException ex)
255+
{
256+
occur = true;
257+
}
258+
occur.IsTrue();
259+
}
260+
243261
IEnumerator ToaruCoroutineEnumerator()
244262
{
245263
yield return null;

0 commit comments

Comments
 (0)