- Home /
Question by
Noktai · Oct 29, 2015 at 04:20 AM ·
editor-scriptinglayermask
How can I prevent my EditorGUI.Maskfield from showing Mixed... ?
I am using a maskfield in my custom editor;
selectedValue = EditorGUI.MaskField( position, property.name, selectedValue, options.ToArray() );
When multiple values are selected, it is displayed like this;
Unity's layermask looks like this, with multiple values aligned horizontally
(changing the width of the field does not yield any different behavior) Any idea how I could mimic this behavior?
maskfield.png
(1.9 kB)
layermask.png
(2.4 kB)
Comment
Answer by Micmac424 · Feb 10, 2016 at 09:07 PM
You could draw a label on top with same style: GUI.Label(rSummary, summaryLabel, EditorStyles.popup);
Just generate a proper summary string.
Your answer
