From 841e449f783dd665a477834f3d7522c447d2b2e3 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Thu, 1 Feb 2024 16:12:01 +0900 Subject: [PATCH] fix: fix compile error in Unity 2021.1 or older --- Editor/UIParticleEditor.cs | 3 +++ Runtime/Utils.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Editor/UIParticleEditor.cs b/Editor/UIParticleEditor.cs index 623005a..779d09d 100644 --- a/Editor/UIParticleEditor.cs +++ b/Editor/UIParticleEditor.cs @@ -6,10 +6,13 @@ using UnityEditor.UI; using UnityEditorInternal; using UnityEngine; using UnityEngine.UI; +using Coffee.UIParticleExtensions; #if UNITY_2021_2_OR_NEWER using UnityEditor.Overlays; #else +using System; using System.Reflection; +using Object = UnityEngine.Object; #endif #if UNITY_2021_2_OR_NEWER using UnityEditor.SceneManagement; diff --git a/Runtime/Utils.cs b/Runtime/Utils.cs index 9c3b80a..4d4ac85 100644 --- a/Runtime/Utils.cs +++ b/Runtime/Utils.cs @@ -287,7 +287,7 @@ namespace Coffee.UIParticleExtensions } } -#if !UNITY_2021_2_OR_NEWER || UNITY_2020_3_45 || UNITY_2020_3_46 || UNITY_2020_3_47 || UNITY_2020_3_48 +#if !UNITY_2021_2_OR_NEWER && !UNITY_2020_3_45 && !UNITY_2020_3_46 && !UNITY_2020_3_47 && !UNITY_2020_3_48 public static T GetComponentInParent(this Component self, bool includeInactive) where T : Component { if (!self) return null;