コード例 #1
0
    public static void ShowFloatRangeField(string fieldName, StatRangeFloat rangeVal, GUISkin skin, string text = " to ")
    {
        GUILayout.BeginVertical();

        GUILayout.BeginHorizontal();
        EditorGUILayout.LabelField(fieldName, skin.label, FieldLabelShrinkGUIOption, FieldDefaultHeightGUIOption);

        rangeVal.min = EditorGUILayout.FloatField(rangeVal.min, skin.textField, TextfieldMinWidthGUIOption);

        EditorGUILayout.LabelField(text, skin.label);
        rangeVal.max = EditorGUILayout.FloatField(rangeVal.max, skin.textField, TextfieldMinWidthGUIOption);
        GUILayout.EndHorizontal();

        GUILayout.EndVertical();
    }