unity custom inspector dropdown code example
Example: unity create drop down menu in inspector
public class Player : Monobehaviour
{
public List<string> NameList;
[Dropdown("NameList")]//input the path of the list
public string MyName;
}