当前位置: 首页>>代码示例>>C#>>正文


C# SerializedProperty.CountInProperty方法代码示例

本文整理汇总了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;
        }
开发者ID:BaptisteMarechaux,项目名称:Blow-Game-2016,代码行数:8,代码来源:ScreenSpaceReflectionEditor.cs

示例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;
     }
 }
开发者ID:dreamanlan,项目名称:CSharpGameFramework,代码行数:10,代码来源:SkillRecordDrawer.cs

示例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);
        }
开发者ID:ymfact,项目名称:railgun,代码行数:13,代码来源:TonemappingColorGradingEditor.cs

示例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);
     }
 }
开发者ID:Doy32,项目名称:Samurai,代码行数:20,代码来源:ReadOnlyDrawer.cs

示例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();
    }
开发者ID:andrewstarnes,项目名称:wwtd2,代码行数:9,代码来源:FastPoolEditor.cs


注:本文中的UnityEditor.SerializedProperty.CountInProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。