static private GetChildrenCount ( UnityEditor.SerializedProperty property ) : int | ||
property | UnityEditor.SerializedProperty | |
리턴 | int |
internal static int GetChildrenCount(SerializedProperty property)
{
int num = 0;
SerializedProperty x = property.Copy();
SerializedProperty endProperty = x.GetEndProperty();
while (!SerializedProperty.EqualContents(x, endProperty))
{
num++;
x.NextVisible(true);
}
return num;
}
}
internal static void GenericStruct(SerializedProperty property, params GUILayoutOption[] options) { float num = 16f + 16f * (float)StructPropertyGUILayout.GetChildrenCount(property); Rect rect = GUILayoutUtility.GetRect(EditorGUILayout.kLabelFloatMinW, EditorGUILayout.kLabelFloatMaxW, num, num, EditorStyles.layerMaskField, options); StructPropertyGUI.GenericStruct(rect, property); }