#if UNITY_EDITOR using System; using System.Reflection; namespace DCFApixels.DragonECS.Unity.Internal { internal static class ReflectionExtensions { public static bool TryGetAttribute(this MemberInfo self, out T attrbiute) where T : Attribute { attrbiute = self.GetCustomAttribute(); return attrbiute != null; } public static bool HasAttribute(this MemberInfo self) where T : Attribute { return self.GetCustomAttribute() != null; } } } #endif