예제 #1
0
 /// <summary>
 /// 默认属性字段的绘制,也会为PropertyField自动绘制
 /// </summary>
 /// <param name="position"></param>
 /// <param name="property"></param>
 /// <param name="label"></param>
 public static void OnGUI(Rect position, SerializedProperty property, GUIContent label)
 {
     label = EditorGUI.BeginProperty(position, label, property);
     EditorGUI.CurveField(EditorGUI.PrefixLabel(SubtractPopupWidth(position), label), property, Color.green, default(Rect));
     AnimationCurvePopupMenu.Show(GetPopupRect(position), null, property);
     EditorGUI.EndProperty();
 }
예제 #2
0
    public static AnimationCurve CurveField(Rect position, GUIContent label, AnimationCurve value)
    {
        AnimationCurve animationCurve = EditorGUI.CurveField(SubtractPopupWidth(position), label, value);

        AnimationCurvePopupMenu.Show(GetPopupRect(position), animationCurve, null);
        return(animationCurve);
    }