TylerTemp / SaintsField

A Unity Inspector extension tool focusing on script fields inspector enhancement
MIT License
194 stars 10 forks source link

Click on dropdown arrow not workink #101

Open hungin opened 7 hours ago

hungin commented 7 hours ago

It is irritating that clicking on the arrow of a dropdown is not workink.

TylerTemp commented 7 hours ago

Hi,

Dropdown & AdvancedDropdown with array/list is already supported a while ago.

[Dropdown(nameof(GetDropdownItems))]
public float[] floats;

private DropdownList<float> GetDropdownItems()
{
    return new DropdownList<float>
    {
        { "1", 1.0f },
        { "2", 2.0f },
        { "3/1", 3.1f },
        { "3/2", 3.2f },
    };
}

image

A price of code which might re-produce the issue, and you Unity version is appreciated. As Unity often broken on Serializable class/struct, or SerializedReference, or abstruct inherence, so this kind of information is important

hungin commented 6 hours ago

It works well, what I mean is that you have to click in the field, if you click directly on the Arrow icon, dropdown will not open.