Table of Contents

CustomDisplayNameFactory Method

CustomDisplayNameFactory(Type, Func<Type, string, ulong, string>)

public static void CustomDisplayNameFactory(Type enumType, Func<Type, string, ulong, string> factory)

By default, EnumMemberAttribute is used to generate display name if exists, otherwise beautify field name. Note that factory method is used only once and automatically cleared after display name generation. (In Unity, InspectorName attribute is priority)

Parameters

enumType Type
factory Func<Type, string, ulong, string>

Remarks

NOTE: underlying value is casted to ulong with unchecked manner.