So, usually, when I need to do a serializable field, Ill just go and write the following down:
EditorGUILayout.PropertyField ( serializableProperty, new GUIContent ( name, tooltip) ) );
But when working with a MaskField, this isnt quite working, as it’ll only display an integer field once I dont know how to fill in the string values for the Mask. How can this be done ?
[GenericMask("Blargh", "Poop", "Harp")]
public int TestMask;
That will have the editor display a mask allowing for selection of entries Blargh, Poop, and Harp. Which result in values 1,2,4 respectively (or some summation there from, as it is a mask).
@lordofduct , thank you! This worked quite nicely at my first try, but then I couldnt get it to work with dynamic strings. I have a case where the size of the MaskField changes during runtime. Is it possible to use your solution in this situation?