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 @@ private static Object FindObjectOfType(string typeName) .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)