public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { float h; if (EditorHelper.AssertMultiObjectEditingNotSupportedHeight(property, label, out h)) { return(h); } this.Init(property, label); if (_alwaysExpanded || property.isExpanded) { h = MARGIN * 2f; h += _targetList.GetHeight(); h += EditorGUIUtility.singleLineHeight * 2f; if (_foldoutTargetExtra) { if (_targetList.index >= 0) { var element = _targetList.serializedProperty.GetArrayElementAtIndex(_targetList.index); h += _triggerTargetDrawer.GetPropertyHeight(element, GUIContent.none); } else { h += EditorGUIUtility.singleLineHeight * 3.0f; } } if (Application.isPlaying) { h += BTN_ACTIVATE_HEIGHT; } } else { h = EditorGUIUtility.singleLineHeight; } return(h); }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { float h; if (EditorHelper.AssertMultiObjectEditingNotSupportedHeight(property, label, out h)) { return(h); } this.Init(property, label); return(_maskList.GetHeight()); }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { float h; if (EditorHelper.AssertMultiObjectEditingNotSupportedHeight(property, label, out h)) { return(h); } this.Init(property, label, true); h = 0f; if (!property.isExpanded) { h = EditorGUIUtility.singleLineHeight; } else { h = _animList.GetHeight() + this.GetDetailHeight(); } return(h); }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { float h; if (EditorHelper.AssertMultiObjectEditingNotSupportedHeight(property, label, out h)) { return(h); } if (property.isArray) { this.StartOnGUI(property, label); if (_disallowFoldout || property.isExpanded) { h = _lst.GetHeight(); if (_drawElementAtBottom && _lst.index >= 0 && _lst.index < property.arraySize) { var pchild = property.GetArrayElementAtIndex(_lst.index); /* * if (_internalDrawer != null) * { * h += _internalDrawer.GetPropertyHeight(pchild, label) + BOTTOM_PAD + TOP_PAD; * } * else if (ElementIsFlatChildField(pchild)) * { * //we don't draw this way if it's a built-in type from Unity * pchild.isExpanded = true; * h += SPEditorGUI.GetDefaultPropertyHeight(pchild, label, true) + BOTTOM_PAD + TOP_PAD - EditorGUIUtility.singleLineHeight; * } * else * { * h += SPEditorGUI.GetDefaultPropertyHeight(pchild, label, false) + BOTTOM_PAD + TOP_PAD; * } */ h += this.GetElementHeight(pchild, label, true) + BOTTOM_PAD + TOP_PAD; } } else { h = EditorGUIUtility.singleLineHeight; } } else { h = EditorGUIUtility.singleLineHeight; } return(h); }