From 5f255ec6cde0ce4147e74627aa7c0910d67f430b Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Mon, 30 Sep 2024 02:12:44 +0900 Subject: [PATCH] demo: fix warning --- .../Demo/Cartoon FX & War FX Demo/CFX_Demo_With_UIParticle.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Demo/Cartoon FX & War FX Demo/CFX_Demo_With_UIParticle.cs b/Assets/Demo/Cartoon FX & War FX Demo/CFX_Demo_With_UIParticle.cs index 53171ec..c5f84ee 100644 --- a/Assets/Demo/Cartoon FX & War FX Demo/CFX_Demo_With_UIParticle.cs +++ b/Assets/Demo/Cartoon FX & War FX Demo/CFX_Demo_With_UIParticle.cs @@ -80,7 +80,11 @@ namespace Coffee.UIExtensions.Demo .SelectMany(x => x.GetTypes()) .FirstOrDefault(x => x.Name == typeName); +#if UNITY_2023_2_OR_NEWER + return type == null ? null : FindFirstObjectByType(type); +#else return type == null ? null : FindObjectOfType(type); +#endif } public void SetCanvasWidth(int width)