diff --git a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef index 2339898da..f78a9e699 100644 --- a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef +++ b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef @@ -8,5 +8,31 @@ "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [], - "versionDefines": [] -} \ No newline at end of file + "versionDefines": [ + { + "name": "com.unity.modules.animation", + "expression": "", + "define": "UNIRX_ANIMATION_SUPPORT" + }, + { + "name": "com.unity.modules.physics", + "expression": "", + "define": "UNIRX_PHYSICS_SUPPORT" + }, + { + "name": "com.unity.modules.physics2d", + "expression": "", + "define": "UNIRX_PHYSICS2D_SUPPORT" + }, + { + "name": "com.unity.modules.unitywebrequestwww", + "expression": "", + "define": "UNIRX_WWW_SUPPORT" + }, + { + "name": "com.unity.ugui", + "expression": "", + "define": "UNIRX_UGUI_SUPPORT" + } + ] +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs index 91cc8c459..460e19b63 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs @@ -117,6 +117,7 @@ void ConsumeEnumerator(IEnumerator routine) } var type = current.GetType(); +#if !UNITY_2019_1_OR_NEWER || UNIRX_WWW_SUPPORT #if UNITY_2018_3_OR_NEWER #pragma warning disable CS0618 #endif @@ -126,10 +127,12 @@ void ConsumeEnumerator(IEnumerator routine) editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitWWW(www, routine)), null); return; } + else #if UNITY_2018_3_OR_NEWER #pragma warning restore CS0618 #endif - else if (type == typeof(AsyncOperation)) +#endif + if (type == typeof(AsyncOperation)) { var asyncOperation = (AsyncOperation)current; editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitAsyncOperation(asyncOperation, routine)), null); @@ -162,6 +165,7 @@ void ConsumeEnumerator(IEnumerator routine) } } +#if !UNITY_2019_1_OR_NEWER || UNIRX_WWW_SUPPORT #if UNITY_2018_3_OR_NEWER #pragma warning disable CS0618 #endif @@ -175,6 +179,7 @@ IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation) } #if UNITY_2018_3_OR_NEWER #pragma warning restore CS0618 +#endif #endif IEnumerator UnwrapWaitAsyncOperation(AsyncOperation asyncOperation, IEnumerator continuation) @@ -680,4 +685,4 @@ public static IObservable OnApplicationQuitAsObservable() return Instance.onApplicationQuit ?? (Instance.onApplicationQuit = new Subject()); } } -} \ No newline at end of file +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs index 9090a6f31..1fdf767ec 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs @@ -229,12 +229,14 @@ public static partial class Observable { readonly static HashSet YieldInstructionTypes = new HashSet { + #if !UNITY_2019_1_OR_NEWER || UNIRX_WWW_SUPPORT #if UNITY_2018_3_OR_NEWER #pragma warning disable CS0618 #endif typeof(WWW), #if UNITY_2018_3_OR_NEWER #pragma warning restore CS0618 +#endif #endif typeof(WaitForEndOfFrame), typeof(WaitForFixedUpdate), diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs index e1bc7d7d7..803761da5 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs @@ -1,3 +1,5 @@ +#if !UNITY_2019_1_OR_NEWER || UNIRX_WWW_SUPPORT + using System; using System.Collections; using UnityEngine; @@ -16,10 +18,10 @@ namespace UniRx #if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) // Fallback for Unity versions below 4.5 using Hash = System.Collections.Hashtable; - using HashEntry = System.Collections.DictionaryEntry; + using HashEntry = System.Collections.DictionaryEntry; #else - // Unity 4.5 release notes: - // WWW: deprecated 'WWW(string url, byte[] postData, Hashtable headers)', + // Unity 4.5 release notes: + // WWW: deprecated 'WWW(string url, byte[] postData, Hashtable headers)', // use 'public WWW(string url, byte[] postData, Dictionary headers)' instead. using Hash = System.Collections.Generic.Dictionary; using HashEntry = System.Collections.Generic.KeyValuePair; @@ -408,7 +410,7 @@ public WWWErrorException(WWW www, string text) this.RawErrorMessage = www.error; this.ResponseHeaders = www.responseHeaders; this.HasResponse = false; - this.Text = text; + this.Text = text; var splitted = RawErrorMessage.Split(' ', ':'); if (splitted.Length != 0) @@ -439,4 +441,6 @@ public override string ToString() #if UNITY_2018_3_OR_NEWER #pragma warning restore CS0618 -#endif \ No newline at end of file +#endif + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs index 18471bf7f..449fead80 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs @@ -359,7 +359,7 @@ public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this #if !UniRxLibrary // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) /// /// Bind ReactiveCommand to button's interactable and onClick. @@ -440,7 +440,7 @@ public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this #if !UniRxLibrary // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) /// /// Bind AsyncRaectiveCommand to button's interactable and onClick. diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs index 4628d03eb..e402cdb07 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_ANIMATION_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -46,4 +48,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs index fefc213b2..73cd248ad 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs index dac84dac8..a1f425bea 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs index e4936f571..6aa44fa9e 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -64,4 +66,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs index db7dd5e63..5f6a097d7 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -64,4 +66,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs index 91465c1ff..2c484cb44 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs index 6dff39f2a..0487d09dd 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs index 7d2634568..b16a59989 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs index 8d68135fb..ae8f4439a 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs index 3c73eb107..22136a4e0 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -356,4 +356,4 @@ protected override void RaiseOnCompletedOnDestroy() } } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs index 06db037f3..9fe181480 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs index 8e4c39f93..84ccb35de 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -17,8 +19,8 @@ public IObservable OnJointBreakAsObservable() { return onJointBreak ?? (onJointBreak = new Subject()); } - - + + Subject onJointBreak2D; void OnJointBreak2D(Joint2D brokenJoint) @@ -30,7 +32,7 @@ public IObservable OnJointBreak2DAsObservable() { return onJointBreak2D ?? (onJointBreak2D = new Subject()); } - + protected override void RaiseOnCompletedOnDestroy() { @@ -44,4 +46,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs index bd05d145e..30b8ae496 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs index 1cac1d91d..a2fe8aa19 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs index 4ff2dff4f..e153b11ad 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs index 615a83c17..6d40afc03 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs index 90d904576..3db5864e0 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs index 877e63aa0..e852572c7 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs index dd60ffd14..aa5b1c5fe 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs index d80579b24..6483926c0 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs index cd38afe70..3ee79ece3 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs @@ -1,5 +1,5 @@ // over Unity5 added StateMachineBehaviour -#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) +#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) && (!UNITY_2019_1_OR_NEWER || UNIRX_ANIMATION_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -140,4 +140,4 @@ public IObservable OnStateMachineExitAsObservable() } } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs index 8c3d6dd40..e66e57bda 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs index 565a40db4..d2d175fe7 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -64,4 +66,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs index 1c90e2e5d..5fdbbf645 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs @@ -1,7 +1,7 @@ using System; // require keep for Windows Universal App using UnityEngine; -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using UnityEngine.EventSystems; #endif @@ -10,6 +10,9 @@ namespace UniRx.Triggers // for Component public static partial class ObservableTriggerExtensions { + +#if !UNITY_2019_1_OR_NEWER || UNIRX_ANIMATION_SUPPORT + #region ObservableAnimatorTrigger /// Callback for setting up animation IK (inverse kinematics). @@ -28,6 +31,10 @@ public static IObservable OnAnimatorMoveAsObservable(this Component compon #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + #region ObservableCollision2DTrigger /// Sent when an incoming collider makes contact with this object's collider (2D physics only). @@ -54,6 +61,10 @@ public static IObservable OnCollisionStay2DAsObservable(this Compon #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + #region ObservableCollisionTrigger /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. @@ -80,6 +91,8 @@ public static IObservable OnCollisionStayAsObservable(this Component #endregion +#endif + #region ObservableDestroyTrigger /// This function is called when the MonoBehaviour will be destroyed. @@ -189,6 +202,8 @@ public static IObservable OnMouseUpAsButtonAsObservable(this Component com #endif +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + #region ObservableTrigger2DTrigger /// Sent when another object enters a trigger collider attached to this object (2D physics only). @@ -215,6 +230,10 @@ public static IObservable OnTriggerStay2DAsObservable(this Component #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + #region ObservableTriggerTrigger /// OnTriggerEnter is called when the Collider other enters the trigger. @@ -241,6 +260,8 @@ public static IObservable OnTriggerStayAsObservable(this Component com #endregion +#endif + #region ObservableUpdateTrigger /// Update is called every frame, if the MonoBehaviour is enabled. @@ -326,6 +347,7 @@ public static IObservable OnRectTransformRemovedAsObservable(this Componen #endregion +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) // uGUI #region ObservableEventTrigger classes @@ -433,6 +455,7 @@ public static IObservable OnScrollAsObservable(this UIBehaviou } #endregion +#endif #endif @@ -458,4 +481,4 @@ public static IObservable OnParticleTriggerAsObservable(this Component com #endregion } -} \ No newline at end of file +} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs index fd2009f2f..42a54a833 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs @@ -6,6 +6,9 @@ namespace UniRx.Triggers // for GameObject public static partial class ObservableTriggerExtensions { + +#if !UNITY_2019_1_OR_NEWER || UNIRX_ANIMATION_SUPPORT + #region ObservableAnimatorTrigger /// Callback for setting up animation IK (inverse kinematics). @@ -24,6 +27,10 @@ public static IObservable OnAnimatorMoveAsObservable(this GameObject gameO #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + #region ObservableCollision2DTrigger /// Sent when an incoming collider makes contact with this object's collider (2D physics only). @@ -50,6 +57,10 @@ public static IObservable OnCollisionStay2DAsObservable(this GameOb #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + #region ObservableCollisionTrigger /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. @@ -76,6 +87,8 @@ public static IObservable OnCollisionStayAsObservable(this GameObject #endregion +#endif + #region ObservableDestroyTrigger /// This function is called when the MonoBehaviour will be destroyed. @@ -185,6 +198,8 @@ public static IObservable OnMouseUpAsButtonAsObservable(this GameObject ga #endif +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS2D_SUPPORT + #region ObservableTrigger2DTrigger /// Sent when another object enters a trigger collider attached to this object (2D physics only). @@ -211,6 +226,10 @@ public static IObservable OnTriggerStay2DAsObservable(this GameObjec #endregion +#endif + +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + #region ObservableTriggerTrigger /// OnTriggerEnter is called when the Collider other enters the trigger. @@ -237,6 +256,8 @@ public static IObservable OnTriggerStayAsObservable(this GameObject ga #endregion +#endif + #region ObservableUpdateTrigger /// Update is called every frame, if the MonoBehaviour is enabled. diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs index aa4ddea5c..6b3ab8919 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs @@ -1,4 +1,6 @@ -using System; // require keep for Windows Universal App +#if !UNITY_2019_1_OR_NEWER || UNIRX_PHYSICS_SUPPORT + +using System; // require keep for Windows Universal App using UnityEngine; namespace UniRx.Triggers @@ -47,7 +49,7 @@ public IObservable OnTriggerStayAsObservable() { return onTriggerStay ?? (onTriggerStay = new Subject()); } - + protected override void RaiseOnCompletedOnDestroy() { if (onTriggerEnter != null) @@ -64,4 +66,6 @@ protected override void RaiseOnCompletedOnDestroy() } } } -} \ No newline at end of file +} + +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs index bc9b62494..739f437cf 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; // require keep for Windows Universal App using UnityEngine; @@ -33,4 +33,4 @@ protected override void RaiseOnCompletedOnDestroy() } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs index 3e5ef217c..529f57c05 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; using UnityEngine.Events; @@ -41,4 +41,4 @@ public static IObservable DirtyVerticesCallbackAsObservable(this Graphic g } } -#endif \ No newline at end of file +#endif diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs index 8a02cb15b..b70058f8a 100644 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs +++ b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs @@ -1,5 +1,5 @@ // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) +#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) && (!UNITY_2019_1_OR_NEWER || UNIRX_UGUI_SUPPORT) using System; using UnityEngine; @@ -120,4 +120,4 @@ public static IObservable OnValueChangedAsObservable(this Dropdown dropdown } } -#endif \ No newline at end of file +#endif