유니티 EditorGUI.EnumPopup 사용법

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
enum eMyType
{
    type001,
    type002,
}
 
 
public override void OnInspectorGUI()
{
    eMyType myType = eMyType.type001;
 
    var list = new ReorderableList(serializedObject, _areaGroup)
    {
        drawElementCallback = (rect, index, isActive, isFocuse) =>
        {
 
            //인스펙터에서 enumPopup을 추가함.
            myType = (eMyType)EditorGUI.EnumPopup(rect, "my Type", myType);
        },
    };
}
cs

댓글

가장 많이 본 글