static private AddSetToValueOfTargetMenuItems ( |
||
menu | ||
property | UnityEditor.SerializedProperty | |
func | TargetChoiceMenuFunction | |
리턴 | void |
internal static void TargetChoiceField(Rect position, SerializedProperty property, GUIContent label, TargetChoiceHandler.TargetChoiceMenuFunction func) { EditorGUI.BeginProperty(position, label, property); position = EditorGUI.PrefixLabel(position, 0, label); EditorGUI.BeginHandleMixedValueContentColor(); if (GUI.Button(position, EditorGUI.mixedValueContent, EditorStyles.popup)) { GenericMenu menu = new GenericMenu(); TargetChoiceHandler.AddSetToValueOfTargetMenuItems(menu, property, func); menu.DropDown(position); } EditorGUI.EndHandleMixedValueContentColor(); EditorGUI.EndProperty(); }