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

Commit

Permalink
ready for 6.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Sep 12, 2018
1 parent 4e780c2 commit 89b406c
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 17 deletions.
8 changes: 7 additions & 1 deletion Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#if !(UNITY_METRO || UNITY_WP8)

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

using UnityEngine;

Expand Down Expand Up @@ -81,4 +84,7 @@ from bing in ObservableWWW.Get("http://bing.com/")
}

#endif
#pragma warning restore CS0618

#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using System.Collections;
using System.Threading;
using UnityEngine;
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

namespace UniRx.Examples
{
Expand Down Expand Up @@ -38,4 +40,6 @@ static IEnumerator GetWWWCore(string url, IObserver<string> observer, Cancellati
}
}
}
#pragma warning restore CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
4 changes: 4 additions & 0 deletions Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ IEnumerator ComplexCoroutineTest()
// You can use ToYieldInstruction.

#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2)
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

IEnumerator TestNewCustomYieldInstruction()
{
Expand All @@ -51,7 +53,9 @@ IEnumerator TestNewCustomYieldInstruction()
// other sample(wait until transform.position.y >= 100)
yield return this.ObserveEveryValueChanged(x => x.transform).FirstOrDefault(x => x.position.y >= 100).ToYieldInstruction();
}
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
#endif

}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Plugins/UniRx/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UniRx - Reactive Extensions for Unity / Ver 6.2.1
UniRx - Reactive Extensions for Unity / Ver 6.2.2
===
Created by Yoshifumi Kawai(neuecc)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

using System.Collections.Generic;
using System.Threading;

Expand Down
4 changes: 3 additions & 1 deletion Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#endif

using System;
using System.Runtime.CompilerServices;
Expand Down
8 changes: 8 additions & 0 deletions Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public static ResourceRequestAwaiter GetAwaiter(this ResourceRequest resourceReq

#if ENABLE_WWW

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

public static IAwaiter GetAwaiter(this WWW www)
{
Expand Down Expand Up @@ -99,7 +101,9 @@ public static UniTask ToUniTask(this WWW www)
return new UniTask(awaiter);
}

#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif

#endif

Expand Down Expand Up @@ -434,7 +438,9 @@ public void UnsafeOnCompleted(Action continuation)

#if ENABLE_WWW

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

class WWWConfiguredAwaiter : IAwaiter, IPlayerLoopItem
{
Expand Down Expand Up @@ -526,7 +532,9 @@ public void UnsafeOnCompleted(Action continuation)
}
}

#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif

#endif

Expand Down
5 changes: 4 additions & 1 deletion Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#endif

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -80,6 +82,7 @@ static object GetDefaultHelper(Type type)
if (t.Equals(vector3Type)) return (object)UnityEqualityComparer.Vector3;
if (t.Equals(vector4Type)) return (object)UnityEqualityComparer.Vector4;
if (t.Equals(colorType)) return (object)UnityEqualityComparer.Color;
if (t.Equals(color32Type)) return (object)UnityEqualityComparer.Color32;
if (t.Equals(rectType)) return (object)UnityEqualityComparer.Rect;
if (t.Equals(boundsType)) return (object)UnityEqualityComparer.Bounds;
if (t.Equals(quaternionType)) return (object)UnityEqualityComparer.Quaternion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,17 @@ public static CoroutineAsyncBridge GetAwaiter(this Coroutine coroutine)

// should use UniRx.Async in C# 7.0

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
public static CoroutineAsyncBridge<WWW> GetAwaiter(this WWW www)
{
return CoroutineAsyncBridge<WWW>.Start(www);
}
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif



public static CoroutineAsyncBridge<AsyncOperation> GetAwaiter(this AsyncOperation asyncOperation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,18 @@ void ConsumeEnumerator(IEnumerator routine)
}

var type = current.GetType();
#pragma warning disable CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
if (type == typeof(WWW))
{
var www = (WWW)current;
editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitWWW(www, routine)), null);
return;
}
#pragma warning restore CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
else if (type == typeof(AsyncOperation))
{
var asyncOperation = (AsyncOperation)current;
Expand Down Expand Up @@ -158,7 +162,9 @@ void ConsumeEnumerator(IEnumerator routine)
}
}

#pragma warning disable CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation)
{
while (!www.isDone)
Expand All @@ -167,7 +173,9 @@ IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation)
}
ConsumeEnumerator(continuation);
}
#pragma warning restore CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif

IEnumerator UnwrapWaitAsyncOperation(AsyncOperation asyncOperation, IEnumerator continuation)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,13 @@ public static partial class Observable
{
readonly static HashSet<Type> YieldInstructionTypes = new HashSet<Type>
{
#pragma warning disable CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
typeof(WWW),
#pragma warning restore CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
typeof(WaitForEndOfFrame),
typeof(WaitForFixedUpdate),
typeof(WaitForSeconds),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
using ObservableUnity = UniRx.Observable;
#endif

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif

namespace UniRx
{
Expand Down Expand Up @@ -435,4 +437,6 @@ public override string ToString()
}
}

#pragma warning restore CS0618
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#endif

using System;
using System.Collections.Generic;
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Sandbox/SandboxScene.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
using System;
using System.Threading;
using System.Threading.Tasks;
Expand Down

0 comments on commit 89b406c

Please sign in to comment.