From 498a1dc681d8045ad6924a600a43fb8f5acf0a12 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 17 Apr 2026 16:30:49 +0800 Subject: [PATCH] fix --- .../Templates/ComponentTemplateBase.cs | 13 ------------- src/Utils/InspectorAttributes.cs | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Templates/EntityTemplate/Templates/ComponentTemplateBase.cs b/src/Templates/EntityTemplate/Templates/ComponentTemplateBase.cs index b3ea979..7a3fa3a 100644 --- a/src/Templates/EntityTemplate/Templates/ComponentTemplateBase.cs +++ b/src/Templates/EntityTemplate/Templates/ComponentTemplateBase.cs @@ -10,19 +10,6 @@ using System.Reflection; using System.Runtime.InteropServices; using UnityEngine; -namespace DCFApixels.DragonECS.Unity -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = false)] - public sealed class DragonMemberWrapperAttribute : Attribute - { - public string WrappedFieldName; - public DragonMemberWrapperAttribute(string wrappedFieldName) - { - WrappedFieldName = wrappedFieldName; - } - } -} - namespace DCFApixels.DragonECS { diff --git a/src/Utils/InspectorAttributes.cs b/src/Utils/InspectorAttributes.cs index e88bc36..1ea9ba7 100644 --- a/src/Utils/InspectorAttributes.cs +++ b/src/Utils/InspectorAttributes.cs @@ -7,6 +7,16 @@ using UnityEngine; namespace DCFApixels.DragonECS.Unity { + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = false)] + public sealed class DragonMemberWrapperAttribute : Attribute + { + public string WrappedFieldName; + public DragonMemberWrapperAttribute(string wrappedFieldName) + { + WrappedFieldName = wrappedFieldName; + } + } + [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)] public sealed class ReferenceDropDownAttribute : PropertyAttribute { public readonly Type[] AllowTypes; @@ -20,6 +30,7 @@ namespace DCFApixels.DragonECS.Unity Array.Sort(predicateTypes, (a, b) => string.Compare(a.AssemblyQualifiedName, b.AssemblyQualifiedName, StringComparison.Ordinal)); } } + [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)] public sealed class ReferenceDropDownWithoutAttribute : Attribute { public readonly Type[] PredicateTypes; @@ -31,6 +42,7 @@ namespace DCFApixels.DragonECS.Unity Array.Sort(predicateTypes, (a, b) => string.Compare(a.AssemblyQualifiedName, b.AssemblyQualifiedName, StringComparison.Ordinal)); } } + [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)] public sealed class DragonMetaBlockAttribute : PropertyAttribute { } }