summaryrefslogtreecommitdiff
path: root/Assets/Plugins/AdvancedInspector/Attributes/FieldEditor.cs
blob: b5c833d9f98c2ce523de3be233cae990ca37bd8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;

namespace AdvancedInspector
{
    /// <summary>
    /// Can only be placed a classed derived from FieldEditor, or a field/property taking a specific editor.
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public class FieldEditorAttribute : Attribute, IListAttribute
    {
        private string type = "";

        /// <summary>
        /// Type's name of the FieldEditor to use.
        /// </summary>
        public string Type
        {
            get { return type; }
        }

        public FieldEditorAttribute(string type)
        {
            this.type = type;
        }
    }
}