public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            if (!property.isExpanded)
                return kHeadingSpace;

            var count = property.CountInProperty();
            return EditorGUIUtility.singleLineHeight * count  + 15;
        }
 public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
 {
     SerializedProperty skillIds = property.FindPropertyRelative("subsequentSkills");
     SerializedProperty skillres = property.FindPropertyRelative("resources");
     if (property.isExpanded) {
         return (property.CountInProperty() + 1 + skillIds.arraySize + 1 + skillres.arraySize + 1) * c_FieldHeight + 100;
     } else {
         return c_FieldHeight;
     }
 }
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            var wheelAttribute = (TonemappingColorGrading.ColorWheelGroup)attribute;
            property.isExpanded = true;

            m_NumberOfWheels = property.CountInProperty() - 1;
            if (m_NumberOfWheels == 0)
                return 0;

            m_RenderSizePerWheel = Mathf.FloorToInt((EditorGUIUtility.currentViewWidth) / m_NumberOfWheels) - 30;
            m_RenderSizePerWheel = Mathf.Clamp(m_RenderSizePerWheel, wheelAttribute.minSizePerWheel, wheelAttribute.maxSizePerWheel);
            return TonemappingColorGradingEditor.ColorWheel.GetColorWheelHeight(m_RenderSizePerWheel);
        }
Example #4
0
 public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
 {
     if (property.isExpanded)
     {
         return property.CountInProperty() * 16f;
     }
     else
     if (FieldInfoHelper.IsTypeOrCollectionOfType<Bounds>(fieldInfo.FieldType))
     {
         return 2 * 16f;
     }
     else if(property.propertyType == SerializedPropertyType.Vector3 && inspectorWidth < 306f)
     {
         return 2 * 16f;
     }
     else
     {
         return base.GetPropertyHeight(property, label);
     }
 }
Example #5
0
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    {
        propHeight = base.GetPropertyHeight(property, label);

        if (Application.isPlaying)
            return (propHeight + (property.isExpanded ? 2 : 0)) * 2;
        else
            return (propHeight + (property.isExpanded ? 2 : 0)) * property.CountInProperty();
    }