예제 #1
0
        public static void EnumPopup <T>(this MaterialEditor materialEditor, MaterialProperty property, Action <Material, Enum> callback = null, params GUILayoutOption[] options)
#if CSHARP_7_3_OR_NEWER
            where T : Enum
#endif
        {
            materialEditor.EnumPopup <T>(property, property.displayName, callback, options);
        }
예제 #2
0
        public static void KeywordEnum <T>(this MaterialEditor materialEditor, MaterialProperty property, string label, params GUILayoutOption[] options)
#if CSHARP_7_3_OR_NEWER
            where T : Enum
#endif
        {
            materialEditor.EnumPopup <T>(property, label, (mat, selection) =>
            {
                mat.SetKeyword(selection);
            }, options);
        }