Пример #1
0
        private void DrawBCL()
        {
            EditorGUI.LabelField(new Rect(paddedleft + 12, line, 60, LINEHEIGHT), showBclContent, (GUIStyle)"MiniLabel");
            //bool bclToggle = EditorGUI.Foldout(new Rect(paddedleft, line, 16, LINEHEIGHT), fc.expandBCL, GUIContent.none/*, (GUIStyle)"OL Toggle"*/);
            bool bclToggle = EditorGUI.Toggle(new Rect(paddedleft, line, 32, LINEHEIGHT), GUIContent.none, fc.expandBCL, (GUIStyle)"Foldout");

            if (fc.expandBCL != bclToggle)
            {
                haschanged = true;
                Undo.RecordObject(p.serializedObject.targetObject, "Toggle Show BCL Details");
                fc.expandBCL = bclToggle;
            }

            float labelw      = 48;
            float fieldL      = ir.xMin + labelw;
            float fieldw      = ir.width - labelw;
            float fldWdth4th  = fieldw / 4;
            float fldWdth8th  = fieldw / 8;
            float fldWdth16th = fieldw / 16;

            if (fc.expandBCL)
            {
                SolidTextures.DrawTexture(new Rect(fieldL, line, fieldw, BCL_HEIGHT - SPACING), SolidTextures.darken052D);
            }

            DrawBCLField(BitCullingLevel.DropAll, fieldL, fldWdth4th, fldWdth8th, fldWdth16th);
            DrawBCLField(BitCullingLevel.DropHalf, fieldL, fldWdth4th, fldWdth8th, fldWdth16th);
            DrawBCLField(BitCullingLevel.DropThird, fieldL, fldWdth4th, fldWdth8th, fldWdth16th);
            DrawBCLField(BitCullingLevel.NoCulling, fieldL, fldWdth4th, fldWdth8th, fldWdth16th);

            line += LINEHEIGHT;
            if (!fc.expandBCL)
            {
                return;
            }

            //SolidTextures.DrawTexture(new Rect(paddedleft, line -1, paddedwidth, 1), SolidTextures.contrastgray2D);

            EditorGUI.LabelField(new Rect(paddedleft, line, labelw, LINEHEIGHT), "bits", (GUIStyle)"MiniLabel");

            // Reset Button
            if (GUI.Button(new Rect(fieldL - 18 - 2, line, 18, LINEHEIGHT), rstLabel, (GUIStyle)"minibuttonleft"))
            {
                haschanged = true;
                Undo.RecordObject(p.serializedObject.targetObject, "Reset BCL To Default");
                fc.SetBits(fc.Bits);
            }

            line += LINEHEIGHT;
            EditorGUI.LabelField(new Rect(paddedleft, line, labelw, LINEHEIGHT), "zones", (GUIStyle)"MiniLabel");
            line += LINEHEIGHT;

            line += SPACING;
        }
Пример #2
0
        private void DrawBCLField(BitCullingLevel bcl, float fieldL, float fldWdth4th, float fldWdth8th, float fldWdth16th)
        {
            int holdindent = EditorGUI.indentLevel;

            EditorGUI.indentLevel = 0;

            float lines = line;

            float left = fieldL + fldWdth4th * (3 - (int)bcl);

            if (fc.expandBCL)
            {
                if (bcl == BitCullingLevel.DropAll || bcl == BitCullingLevel.DropThird)
                {
                    SolidTextures.DrawTexture(new Rect(left, line, fldWdth4th, BCL_HEIGHT), SolidTextures.darken052D);
                }

                string clvl =
                    r.width > 300 ?
                    (((int)bcl == 0) ? "Cull None" : ((int)bcl == 1) ? "Lvl 1" : ((int)bcl == 2) ? "Lvl 2" : "Cull All") :
                    (((int)bcl == 0) ? "None" : ((int)bcl == 1) ? "Lvl 1" : ((int)bcl == 2) ? "Lvl 2" : "All");

                EditorGUI.LabelField(new Rect(left, lines, fldWdth4th, LINEHEIGHT), clvl, (GUIStyle)"ProjectBrowserGridLabel");
                lines += LINEHEIGHT;
            }

            EditorGUI.indentLevel = 0;
            int bits = EditorGUI.DelayedIntField(new Rect(left + fldWdth16th, lines + 1, fldWdth8th, LINEHEIGHT), fc.GetBits(bcl), MINI_TXT_FLD_STYLE);

            EditorGUI.indentLevel = 0;

            if (bits != fc.GetBits(bcl))
            {
                haschanged = true;
                Undo.RecordObject(p.serializedObject.targetObject, "BCL " + bcl + " changed");
                fc.SetBits(bits, bcl);

                Debug.Log("bcl " + bcl + " " + bits + " " + fc.GetBits(bcl));
            }

            if (fc.expandBCL)
            {
                lines += LINEHEIGHT;
                var    rng = (double)Math.Abs(fc.Max - fc.Min);
                string str = ((fc.GetBits(bcl) == 0) ? 0 : (rng / Math.Pow(2, fc.Bits - fc.GetBits(bcl)))).ToString("####0.#####");
                EditorGUI.LabelField(new Rect(left, lines, fldWdth4th, LINEHEIGHT), str, (GUIStyle)"ProjectBrowserGridLabel");
            }

            EditorGUI.indentLevel = holdindent;
        }
Пример #3
0
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(r, label, property);

            base.OnGUI(r, property, label);

            // Hackjob way to get the target
            fc     = (FloatCrusher)DrawerUtils.GetParent(property.FindPropertyRelative("_min"));
            height = CalculateHeight(fc);

            this.r                = r;
            savedIndentLevel      = EditorGUI.indentLevel;
            EditorGUI.indentLevel = 0;

            line = r.yMin;

            colortex =
                (fc.axis == Axis.X) ? SolidTextures.red2D :
                (fc.axis == Axis.Y) ? SolidTextures.green2D :
                (fc.axis == Axis.Z) ? SolidTextures.blue2D :
                SolidTextures.gray2D;

            SolidTextures.DrawTexture(new Rect(r.xMin - 1, line - 1, r.width + 2, height + 2), SolidTextures.lowcontrast2D);
            SolidTextures.DrawTexture(new Rect(r.xMin, line, r.width, height), colortex);

            line += SPACING;
            DrawHeader(r, label);

            if (fc.enabled)
            {
                line += HHEIGHT + SPACING;
                DrawResolution();

                DrawCodecSettings(property);

                line += LINEHEIGHT + 3;
                DrawFooter();
            }

            EditorGUI.indentLevel = savedIndentLevel;

            EditorGUI.EndProperty();
        }
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            gc.text    = label.text;
            gc.tooltip = label.tooltip;

            EditorGUI.BeginProperty(r, label, property);
            base.OnGUI(r, property, label);

            //property.serializedObject.ApplyModifiedProperties();
            //property.serializedObject.Update();

            //haschanged = true;
            // Hacky way to get the real object
            TransformCrusher target = (TransformCrusher)DrawerUtils.GetParent(property.FindPropertyRelative("posCrusher"));

            float currentline = r.yMin;

            SerializedProperty pos        = property.FindPropertyRelative("posCrusher");
            SerializedProperty rot        = property.FindPropertyRelative("rotCrusher");
            SerializedProperty scl        = property.FindPropertyRelative("sclCrusher");
            SerializedProperty isExpanded = property.FindPropertyRelative("isExpanded");

            float ph = EditorGUI.GetPropertyHeight(pos);
            float rh = EditorGUI.GetPropertyHeight(rot);
            float sh = EditorGUI.GetPropertyHeight(scl);


            /// Header

            bool _isExpanded = EditorGUI.Foldout(new Rect(r.xMin, currentline, r.width, TITL_HGHT), isExpanded.boolValue, "");

            if (isExpanded.boolValue != _isExpanded)
            {
                isExpanded.boolValue = _isExpanded;
                property.serializedObject.ApplyModifiedProperties();
            }

            EditorGUI.LabelField(new Rect(r.xMin, currentline, r.width, TITL_HGHT), gc);            // property.displayName /*new GUIContent("Transform Crusher " + label)*//*, (GUIStyle)"BoldLabel"*/);

            int totalbits = target.TallyBits();
            int frag0bits = Mathf.Clamp(totalbits, 0, 64);
            int frag1bits = Mathf.Clamp(totalbits - 64, 0, 64);
            int frag2bits = Mathf.Clamp(totalbits - 128, 0, 64);
            int frag3bits = Mathf.Clamp(totalbits - 192, 0, 64);

            string bitstr = frag0bits.ToString();

            if (frag1bits > 0)
            {
                bitstr += "|" + frag1bits;
            }
            if (frag2bits > 0)
            {
                bitstr += "|" + frag2bits;
            }
            if (frag3bits > 0)
            {
                bitstr += "|" + frag3bits;
            }

            bitstr = bitstr + " bits";
            EditorGUI.LabelField(new Rect(paddedleft, currentline, paddedwidth, 16), bitstr, miniLabelRight);

            if (isExpanded.boolValue)
            {
                Rect ir = r;                 // EditorGUI.IndentedRect(r);;
                ir.yMin      = ir.yMin + HEADR_HGHT + 2;
                ir.xMin     -= BOUNDING_PADDING;
                ir.xMax     += BOUNDING_PADDING;
                ir.yMax     -= 6;
                currentline += BOUNDING_PADDING;
                //EditorGUI.LabelField(ir, GUIContent.none, /*(GUIStyle)"RectangleToolVBar");// */(GUIStyle)"HelpBox");
                ir = EditorGUI.IndentedRect(ir);
                //ir.xMin += 1; ir.xMax -= 1;
                //ir.yMin += 1; ir.yMax -= 1;
                SolidTextures.DrawTexture(ir, SolidTextures.darken202D);

                /// TRS Element Boxes
                currentline += TITL_HGHT;
                //float leftConnectorY = currentline;


                DrawSet(r, currentline, ph, pos);
                currentline += ph + SET_PAD;

                DrawSet(r, currentline, rh, rot);
                currentline += rh + SET_PAD;

                DrawSet(r, currentline, sh, scl);
                currentline += sh /*+ SET_PAD*/;

                /// Connecting line between TRS Elements
                //SolidTextures.DrawTexture(new Rect(4, leftConnectorY + 4, 4, currentline - leftConnectorY), SolidTextures.lowcontrast2D);
                //EditorGUI.LabelField(new Rect(0, leftConnectorY + 4, 4, currentline - leftConnectorY - 12), GUIContent.none, (GUIStyle)"MiniSliderVertical");
            }


            EditorGUI.EndProperty();
        }
Пример #5
0
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(r, label, property);

            base.OnGUI(r, property, label);

            property.serializedObject.Update();

            target = (QuatCrusher)DrawerUtils.GetParent(property.FindPropertyRelative("bits"));
            MonoBehaviour component = (MonoBehaviour)property.serializedObject.targetObject;

            if (target.transform == null)
            {
                target.transform = component.transform;
            }

            line = r.yMin;

            float standalonesheight = target.isStandalone ? (SPACING + LINEHEIGHT) * 2 : 0;
            float boxheight         = SPACING + HHEIGHT + SPACING + LINEHEIGHT + standalonesheight + SPACING;

            SolidTextures.DrawTexture(new Rect(r.xMin - 1, line - 1, r.width + 2, boxheight + 2), SolidTextures.lowcontrast2D);
            SolidTextures.DrawTexture(new Rect(r.xMin, line, r.width, boxheight), SolidTextures.gray2D);

            line += SPACING;
            DrawHeader(new Rect(r));
            line += HHEIGHT + SPACING;

            CompressLevel clvl = (CompressLevel)EditorGUI.EnumPopup(new Rect(paddedleft, line, labelwidth - PADDING, LINEHEIGHT), GUIContent.none, target.CompressLevel);

            if (!QC_ISPRO)
            {
                // In case we went from pro to free... quietly set this back to non-custom.
                if (target.CompressLevel == CompressLevel.SetBits)
                {
                    target.Bits = (int)target.CompressLevel;                     // CompressLevel =  CompressLevel.uint32Med;
                }
                else if (clvl == CompressLevel.SetBits)
                {
                    ProFeatureDialog("");
                    target.CompressLevel = (CompressLevel)target.Bits;
                }

                else
                {
                    target.CompressLevel = clvl;
                }
            }

            else if (clvl != target.CompressLevel)
            {
                target.CompressLevel = clvl;
            }


            var bitssp = property.FindPropertyRelative("bits");

            GUI.enabled = (QC_ISPRO);
            EditorGUI.PropertyField(new Rect(fieldleft, line, fieldwidth, LINEHEIGHT), bitssp, GUIContent.none);
            GUI.enabled = true;

            if (QC_ISPRO && bitssp.intValue != target.Bits)
            {
                target.CompressLevel = CompressLevel.SetBits;
            }



            if (target.isStandalone)
            {
                line += LINEHEIGHT + SPACING;
                EditorGUI.PropertyField(new Rect(paddedleft, line, paddedwidth, LINEHEIGHT), property.FindPropertyRelative("transform"));
                line += LINEHEIGHT + SPACING;
                EditorGUI.PropertyField(new Rect(paddedleft, line, paddedwidth, LINEHEIGHT), property.FindPropertyRelative("local"));
            }

            property.serializedObject.ApplyModifiedProperties();

            EditorGUI.EndProperty();
        }
Пример #6
0
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(r, label, property);

            haschanged = false;
            p          = property;

            base.OnGUI(r, property, label);

            bool isWrappedInElementCrusher = DrawerUtils.GetParent(property) is ElementCrusher;
            bool disableRange = (label.tooltip != null && label.tooltip.Contains("DISABLE_RANGE"));

            gc_fc.text    = label.text;
            gc_fc.tooltip = (disableRange) ? null : label.tooltip;

            holdindent            = EditorGUI.indentLevel;
            EditorGUI.indentLevel = 0;

            int hash = fc.GetHashCode();

            height = CalculateHeight(fc, hash);

            this.r = r;


            line = r.yMin;

            colortex =
                (fc.axis == Axis.X) ? SolidTextures.red2D :
                (fc.axis == Axis.Y) ? SolidTextures.green2D :
                (fc.axis == Axis.Z) ? SolidTextures.blue2D :
                SolidTextures.gray2D;

            if (!isWrappedInElementCrusher)
            {
                Rect outline = ir;
                outline.xMin--;
                outline.yMin--;
                outline.xMax++;
                outline.yMax++;
                SolidTextures.DrawTexture(outline, SolidTextures.lowcontrast2D);
            }
            SolidTextures.DrawTexture(ir, colortex);
            //SolidTextures.DrawTexture(new Rect(ir.xMin, line, ir.width, height), colortex);
            //SolidTextures.DrawTexture(new Rect(ir.xMin + 1, ir.yMin + 1, ir.width - 2, ir.height - 2), colortex);
            line++;

            line += SPACING;

            fc.expanded = DrawHeader(r, gc_fc, fc.expanded);

            line += PADDING + HEADR_HGHT;

            if (fc.Enabled && fc.expanded)
            {
                bool noSettings = (fc.BitsDeterminedBy == BitsDeterminedBy.HalfFloat || fc.BitsDeterminedBy == BitsDeterminedBy.Uncompressed || fc.BitsDeterminedBy == BitsDeterminedBy.Disabled);

                DrawCompressionMethod();

                EditorGUI.BeginDisabledGroup(disableRange);
                if (!noSettings && !(fc.TRSType == TRSType.Normal))
                {
                    DrawCodecSettings(property);
                }
                EditorGUI.EndDisabledGroup();

                if (!noSettings)
                {
                    DrawAccurateCenter();
                }

                if (!noSettings && fc.showBCL)
                {
                    DrawBCL();
                }

                if (!noSettings)
                {
                    DrawActualValues();
                }
            }

            if (haschanged)
            {
                EditorUtility.SetDirty(property.serializedObject.targetObject);
            }

            EditorGUI.indentLevel = holdindent;
            EditorGUI.EndProperty();
        }
Пример #7
0
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(r, label, property);

            haschanged = false;

            base.OnGUI(r, property, label);

            holdindent = EditorGUI.indentLevel;

            property.serializedObject.ApplyModifiedProperties();
            property.serializedObject.Update();

            target = (QuatCrusher)DrawerUtils.GetParent(property.FindPropertyRelative("bits"));


            line = r.yMin;

            //float standalonesheight = target.isStandalone ? (SPACING + LINEHEIGHT) * 2 : 0;
            //float boxheight = SPACING + HEADR_HGHT + SPACING + LINEHEIGHT + standalonesheight + SPACING;

            SolidTextures.DrawTexture(ir, SolidTextures.gray2D);

            //SolidTextures.DrawTexture(new Rect(ir.xMin - 1, line - 1, r.width + 2, boxheight + 2), SolidTextures.lowcontrast2D);
            //SolidTextures.DrawTexture(new Rect(ir.xMin, line, r.width, boxheight), SolidTextures.gray2D);

            line += SPACING;
            DrawHeader(new Rect(r));
            line += HEADR_HGHT + SPACING + SPACING;

            EditorGUI.indentLevel = 0;
            CompressLevel clvl = (CompressLevel)EditorGUI.EnumPopup(new Rect(ir.xMin + PADDING, line, labelwidth - PADDING, LINEHEIGHT), GUIContent.none, target.CompressLevel);

            EditorGUI.indentLevel = holdindent;

            if (!QC_ISPRO)
            {
                // In case we went from pro to free... quietly set this back to non-custom.
                if (target.CompressLevel == CompressLevel.SetBits)
                {
                    if (target.Bits != (int)target.CompressLevel)
                    {
                        haschanged     = true;
                        target.Enabled = true;
                        target.Bits    = (int)target.CompressLevel;                      // CompressLevel =  CompressLevel.uint32Med;
                    }
                }

                else if (clvl == CompressLevel.SetBits)
                {
                    ProFeatureDialog("");
                    if (target.CompressLevel != (CompressLevel)target.Bits)
                    {
                        haschanged           = true;
                        target.CompressLevel = (CompressLevel)target.Bits;
                    }
                }

                else
                {
                    if (target.CompressLevel != clvl)
                    {
                        target.Enabled       = true;
                        haschanged           = true;
                        target.CompressLevel = clvl;
                    }
                }
            }

            else if (clvl != target.CompressLevel)
            {
                haschanged           = true;
                target.CompressLevel = clvl;
            }

            //var bitssp = property.FindPropertyRelative("bits");

            GUI.enabled = (QC_ISPRO);
            int newbits = EditorGUI.IntSlider(new Rect(fieldleft, line, fieldwidth, LINEHEIGHT), GUIContent.none, target.Bits, 16, 64);

            //bool bitschanged = EditorGUI.PropertyField(new Rect(fieldleft, line, fieldwidth, LINEHEIGHT), bitssp, GUIContent.none);
            GUI.enabled = true;

            if (QC_ISPRO && newbits != target.Bits)
            {
                //if (target.CompressLevel != CompressLevel.SetBits)
                //{
                haschanged  = true;
                target.Bits = newbits;
                //target.CompressLevel = CompressLevel.SetBits;
                //}
                property.serializedObject.Update();
            }

            if (target.isStandalone)
            {
                line += LINEHEIGHT + SPACING;
                EditorGUI.PropertyField(new Rect(paddedleft, line, paddedwidth, LINEHEIGHT), property.FindPropertyRelative("transform"));
                line += LINEHEIGHT + SPACING;
                EditorGUI.PropertyField(new Rect(paddedleft, line, paddedwidth, LINEHEIGHT), property.FindPropertyRelative("local"));
            }

            property.serializedObject.ApplyModifiedProperties();

            if (haschanged)
            {
                EditorUtility.SetDirty(property.serializedObject.targetObject);
                //AssetDatabase.SaveAssets();
            }

            EditorGUI.EndProperty();
        }
Пример #8
0
        public override void OnGUI(Rect r, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(r, label, property);

            base.OnGUI(r, property, label);

            // Hacky way to get the real object
            ElementCrusher target = (ElementCrusher)DrawerUtils.GetParent(property.FindPropertyRelative("xcrusher"));

            SerializedProperty uniformAxes = property.FindPropertyRelative("uniformAxes");
            SerializedProperty x           = property.FindPropertyRelative("xcrusher");
            SerializedProperty y           = property.FindPropertyRelative("ycrusher");
            SerializedProperty z           = property.FindPropertyRelative("zcrusher");
            SerializedProperty u           = property.FindPropertyRelative("ucrusher");
            SerializedProperty q           = property.FindPropertyRelative("qcrusher");


            float xh = EditorGUI.GetPropertyHeight(x);
            float yh = EditorGUI.GetPropertyHeight(y);
            float zh = EditorGUI.GetPropertyHeight(z);
            float wh = EditorGUI.GetPropertyHeight(u);
            float qh = EditorGUI.GetPropertyHeight(q);

            bool  isQuatCrush    = target.TRSType == TRSType.Quaternion;
            bool  isUniformScale = target.TRSType == TRSType.Scale && target.uniformAxes != 0;
            float boxesheight    =
                isQuatCrush ? qh :
                isUniformScale ? wh :
                xh + yh + zh;


            float currentline = r.yMin + TOP_PAD;

            GUI.Box(new Rect(r.xMin - 1, currentline - 1, r.width + 2, TITL_HGHT + boxesheight + 2), GUIContent.none, (GUIStyle)"flow shader node 0 on");
            SolidTextures.DrawTexture(new Rect(r.xMin - 1, currentline - 1, r.width + 2, 16 + 2), SolidTextures.lowcontrast2D);
            SolidTextures.DrawTexture(new Rect(r.xMin, currentline, r.width, 16 + SPACING), SolidTextures.contrastgray2D);

            if (target.enableTRSTypeSelector)
            {
                target.TRSType = (TRSType)EditorGUI.EnumPopup(new Rect(r.xMin, currentline + 1, 78, LINEHEIGHT), target.TRSType);
            }
            else if (target.TRSType == TRSType.Quaternion || target.TRSType == TRSType.Euler)
            {
                target.TRSType = (TRSType)EditorGUI.EnumPopup(new Rect(r.xMin, currentline + 1, 78, LINEHEIGHT), (RotationType)target.TRSType);
            }
            else
            {
                GUIContent title = new GUIContent(System.Enum.GetName(typeof(TRSType), target.TRSType));                 // + " Crshr");
                EditorGUI.LabelField(new Rect(paddedleft, currentline, r.width, LINEHEIGHT), title, (GUIStyle)"MiniBoldLabel");
            }

            int localtoggleleft = 80;

            target.local = GUI.Toggle(new Rect(paddedright - localtoggleleft, currentline + 1, 20, LINEHEIGHT), target.local, GUIContent.none, (GUIStyle)"OL Toggle");
            EditorGUI.LabelField(new Rect(paddedright - localtoggleleft + 14, currentline, 80, LINEHEIGHT), new GUIContent("Lcl"), (GUIStyle)"MiniLabel");

            EditorGUI.LabelField(new Rect(paddedleft, currentline, paddedwidth, 16), target.TallyBits() + " Bits", FloatCrusherDrawer.miniLabelRight);

            // Scale Uniform Enum
            if (target.TRSType == TRSType.Scale)
            {
                target.uniformAxes =
                    (ElementCrusher.UniformAxes)EditorGUI.EnumPopup(new Rect(paddedright - 78 - 84, currentline + 1, 78, 16), GUIContent.none, target.uniformAxes);
            }

            currentline += TITL_HGHT;

            if (target.TRSType == TRSType.Scale && uniformAxes.enumValueIndex != 0)
            {
                //SolidTextures.DrawTexture(new Rect(r.xMin - 3, currentline - 1, r.width + 6, wh + 2), SolidTextures.black2D);
                EditorGUI.PropertyField(new Rect(r.xMin, currentline, r.width, wh), u);
            }
            else if (target.TRSType == TRSType.Quaternion)
            {
                EditorGUI.PropertyField(new Rect(r.xMin, currentline, r.width, wh), q);
            }
            else
            {
                //SolidTextures.DrawTexture(new Rect(r.xMin - 3, currentline - 1, r.width + 6, xh + yh +zh + 2), SolidTextures.black2D);
                EditorGUI.PropertyField(new Rect(r.xMin, currentline, r.width, xh), x);
                currentline += xh;
                EditorGUI.PropertyField(new Rect(r.xMin, currentline, r.width, yh), y);
                currentline += yh;
                EditorGUI.PropertyField(new Rect(r.xMin, currentline, r.width, zh), z);
            }

            EditorGUI.EndProperty();
        }