本文整理匯總了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();
}