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