From 1f1fb2a62a9d2ca6562e1b1e70d528aaf52bfc82 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 15 Aug 2023 11:01:23 +0900 Subject: [PATCH] fix: error on InitializeIfNeeded close #264 --- Scripts/UIParticle.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/UIParticle.cs b/Scripts/UIParticle.cs index 21d8e59..44fb460 100755 --- a/Scripts/UIParticle.cs +++ b/Scripts/UIParticle.cs @@ -480,6 +480,7 @@ namespace Coffee.UIExtensions private void InitializeIfNeeded() { + if (!this) return; if (enabled && m_IsTrail) { UnityEngine.Debug.LogWarningFormat(this, "[UIParticle] The UIParticle component should be removed: {0}\nReason: UIParticle for trails is no longer needed.", name);