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 { } }