Skip to content

PopupList linked to the wrong option #158

@jruo

Description

@jruo

If there are two PopupList options that share the same label and the same enum member names (or simply just the same enum type), the second option will be incorrectly linked to the first one.

The first option controls itself, and the second option also controls the first option. The second option cannot be changed.

public class Settings : UnityModManager.ModSettings, IDrawable
{
    public enum FirstEnum
    {
        A,
        B,
        C
    }

    public enum SecondEnum
    {
        A,
        B,
        C
    }

    [Header("Options for a thing")]
    [Draw("Selection", DrawType.PopupList)]
    public FirstEnum FirstSelection = FirstEnum.A;

    [Space(20)]
    [Header("Options for another thing")]
    [Draw("Selection", DrawType.PopupList)]
    public SecondEnum SecondSelection = SecondEnum.A;

    public void OnChange()
    {
    }

    public override void Save(UnityModManager.ModEntry modEntry)
    {
        Save(this, modEntry);
    }
}

Image

Manager version: 0.32.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions