コード例 #1
0
 public static float GetPropertyHeight(System.Type type, GUIContent label)
 {
     if (type == RuntimeSerializedPropertyType.Vector3 || type == RuntimeSerializedPropertyType.Vector2 || type == RuntimeSerializedPropertyType.Vector4)
     {
         return(((EasyGUI.LabelHasContent(label) && !EditorGUIUtility.wideMode) ? kSingleLineHeight : 0f) + kSingleLineHeight);
     }
     if (type == RuntimeSerializedPropertyType.Rect || type == RuntimeSerializedPropertyType.RectInt)
     {
         return(((EasyGUI.LabelHasContent(label) && !EditorGUIUtility.wideMode) ? kSingleLineHeight : 0f) + 2 * kSingleLineHeight);
     }
     if (type == RuntimeSerializedPropertyType.Bounds || type == RuntimeSerializedPropertyType.BoundsInt)
     {
         return((EasyGUI.LabelHasContent(label) ? kSingleLineHeight : 0f) + 2 * kSingleLineHeight);
     }
     return(kSingleLineHeight);
 }