本文整理汇总了C#中UnityEditor.SerializedProperty.CountInProperty方法的典型用法代码示例。如果您正苦于以下问题:C# SerializedProperty.CountInProperty方法的具体用法?C# SerializedProperty.CountInProperty怎么用?C# SerializedProperty.CountInProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEditor.SerializedProperty
的用法示例。
在下文中一共展示了SerializedProperty.CountInProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPropertyHeight
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
if (!property.isExpanded)
return kHeadingSpace;
var count = property.CountInProperty();
return EditorGUIUtility.singleLineHeight * count + 15;
}
示例2: GetPropertyHeight
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;
}
}
示例3: GetPropertyHeight
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);
}
示例4: GetPropertyHeight
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);
}
}
示例5: GetPropertyHeight
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();
}