Skip to content

Commit

Permalink
Merge pull request #6 from Kaynn-Cahya/master
Browse files Browse the repository at this point in the history
Added Tag Attribute Drawer
  • Loading branch information
Deadcows authored Feb 14, 2019
2 parents 8339936 + 4f5368a commit ce1ebfa
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Attributes/Editor/TagAttributeDrawer.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
11 changes: 11 additions & 0 deletions Attributes/Editor/TagAttributeDrawer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Attributes/TagAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using UnityEngine;

public class TagAttribute : PropertyAttribute
{
}
11 changes: 11 additions & 0 deletions Attributes/TagAttribute.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce1ebfa

Please sign in to comment.