diff --git a/Attributes/Editor/TagAttributeDrawer.cs b/Attributes/Editor/TagAttributeDrawer.cs new file mode 100644 index 0000000..a9442dd --- /dev/null +++ b/Attributes/Editor/TagAttributeDrawer.cs @@ -0,0 +1,11 @@ +using UnityEditor; +using UnityEngine; + +[CustomPropertyDrawer(typeof(TagAttribute))] +public class TagAttributeDrawer : PropertyDrawer +{ + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + property.stringValue = EditorGUI.TagField(position, label, property.stringValue); + } +} diff --git a/Attributes/Editor/TagAttributeDrawer.cs.meta b/Attributes/Editor/TagAttributeDrawer.cs.meta new file mode 100644 index 0000000..38e9d49 --- /dev/null +++ b/Attributes/Editor/TagAttributeDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d25f5c39af05cc43a64259e458254d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Attributes/TagAttribute.cs b/Attributes/TagAttribute.cs new file mode 100644 index 0000000..0d09b1c --- /dev/null +++ b/Attributes/TagAttribute.cs @@ -0,0 +1,5 @@ +using UnityEngine; + +public class TagAttribute : PropertyAttribute +{ +} diff --git a/Attributes/TagAttribute.cs.meta b/Attributes/TagAttribute.cs.meta new file mode 100644 index 0000000..0395f9d --- /dev/null +++ b/Attributes/TagAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4112d636c944a774aae43810656bde88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: