jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

Property editors breaking tk.Slider (and tk.IntSlider) #192

Closed SugoiDev closed 7 years ago

SugoiDev commented 7 years ago

Very simple to reproduce (extracted directly from my working code):

...
new tk.Slider(
    nameof(_paddingAdjustment).FiLabel(),
    -10f,
    10f,
    (o, c) => o._paddingAdjustment,
    (o, c, v) => o._paddingAdjustment = v
),
new tk.PropertyEditor(nameof(_editorEnableGizmos).FiLabel(), nameof(_editorEnableGizmos)),
new tk.Slider(
    nameof(_paddingAdjustment).FiLabel(),
    -10f,
    10f,
    (o, c) => o._paddingAdjustment,
    (o, c, v) => o._paddingAdjustment = v
),
...

It'll be rendered like this:

screenshot 2016 11 15-09 11 17

Anyone got any idea why that is happening? I don't see anything strange in tk.Slider or tk.IntSlider, and I'm not knowledgeable enough about FullInspector's generic properties internals to dig deep in there.

SugoiDev commented 7 years ago

Some progress: passing fiGUIContent.Empty instead of a label makes is kinda work:

screenshot 2016 11 15-09 11 27

jacobdufault commented 7 years ago

This should be fixed in dd5b1401e329e3fa3aef96078720e3bc974e0688.