Custom name property

//Testing custom property
public class Player : Monobehaviour
{
    public List<HelmetData> HelmetDataList; 
    
    //Select by HelmetName
    [Dropdown("HelmetDataList", "HelmetName")]
    public HelmetData Helmet1;//The display would become Helmet1.HelmetName
    
    //Select by HelmetID
    [Dropdown("HelmetDataList", "HelmetID")]
    public HelmetData Helmet2;//The display would become Helmet2.HelmetID
    
    //Select by HelmetMaterialName
    [Dropdown("HelmetDataList", "HelmetMaterialName")]
    public HelmetData Helmet3;//The display would become Helmet3.HelmetMaterialName
    
}

Last updated