示例#1
0
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            SetProperties(property);
            float totalHeight = 0F;

            //UniqueID
            totalHeight += EditorTool.GetAddedHeight(EditorTool.LineHeight);
            //text
            totalHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(name));
            return(totalHeight);
        }
        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            SetProperties(property);
            float totalHeight = EditorTool.InitialVerticalPadding;

            //label
            totalHeight += EditorTool.AddedLineHeight;
            //extension
            totalHeight += EditorTool.AddedLineHeight;
            string enumValue = extension.enumNames[extension.enumValueIndex];

            switch (enumValue)
            {
            case "Story":
                float identifierHeight = EditorTool.AddedLineHeight;
                for (int i = 0; i < identifier.arraySize; i++)
                {
                    identifierHeight += EditorTool.GetAddedHeight(EditorTool.GetHeight(identifier.GetArrayElementAtIndex(i)));
                }
                totalHeight += identifierHeight;
                break;
            }
            return(totalHeight);
        }