mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-03 12:44:26 -07:00
24 lines
653 B
C#
24 lines
653 B
C#
// Alloy Physical Shader Framework
|
|
// Copyright 2013-2017 RUST LLC.
|
|
// http://www.alloy.rustltd.com/
|
|
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Alloy {
|
|
[CustomPropertyDrawer(typeof(EnumFlagsAttribute))]
|
|
public class ChannelDrawer : PropertyDrawer {
|
|
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
|
|
EditorGUI.BeginProperty(position, label, property);
|
|
|
|
EditorGUI.BeginChangeCheck();
|
|
int index = EditorGUI.MaskField(position, label, property.intValue, property.enumDisplayNames);
|
|
|
|
if (EditorGUI.EndChangeCheck()) {
|
|
property.intValue = index;
|
|
}
|
|
|
|
EditorGUI.EndProperty();
|
|
}
|
|
}
|
|
} |