using UnityEngine; namespace NBShader { public static class UnityObjectFindCompat { public static T FindAny() where T : Object { #if UNITY_2023_1_OR_NEWER return Object.FindAnyObjectByType(); #else #pragma warning disable 0618 return Object.FindObjectOfType(); #pragma warning restore 0618 #endif } public static T[] FindAll() where T : Object { #if UNITY_2023_1_OR_NEWER return Object.FindObjectsByType(FindObjectsSortMode.None); #else #pragma warning disable 0618 return Object.FindObjectsOfType(); #pragma warning restore 0618 #endif } } }