using UnityEngine; namespace EditorAttributes { /// /// Attribute to make a dropdown menu out of a collection of elements /// public class DropdownAttribute : PropertyAttribute { public string CollectionName { get; private set; } public string[] DisplayNames { get; private set; } /// /// Attribute to make a dropdown menu out of a collection of elements /// /// The name of the collection for the values set by the dropdown public DropdownAttribute(string collectionName) => CollectionName = collectionName; /// /// Attribute to make a dropdown menu out of a collection of elements /// /// The name of the collection for the values set by the dropdown /// Change the display name for each item inside the dropdown public DropdownAttribute(string collectionName, string[] displayNames) : this(collectionName) => DisplayNames = displayNames; } }