arimger/Unity-Editor-Toolbox

LabelByChildAttribute will break child class NewLabelAttribute

Closed this issue · 2 comments

Say we have some definition like this:
image

If we DONOT use LabelByChildAttribute in the red box, we`ll get items display with NewLabel correctly like below:
image

But if we use LabelByChildAttribute, then unexpected result got:
image

Sample code is here, hope can be resolved.

[Serializable]
public class TestArrayGroup
{
    [LabelByChild(nameof(TestArrayItem.foo))]
    [ReorderableList()]
    public TestArrayItem[] items;
}

[Serializable]
public class TestArrayItem
{
    [NewLabel("Foo label")]
    public string foo;
    [NewLabel("Bar label")]
    public string bar;
}

Hello,

thank you for the issue. Will be fixed in the next update.

Fixed in #73.