InspectorFoldoutGroup icon indicating copy to clipboard operation
InspectorFoldoutGroup copied to clipboard

Foldout attribute looks off in Unity versions 2019/2020

Open Cvnvr opened this issue 4 years ago • 3 comments

In Unity versions 2017/2018 the foldout attribute looked identical to the gifs on this repo but in later versions of Unity the way the foldout is rendered looks off? The arrow isn't in line (top left of image) and there's now block-coloured rectangles around each variable (not sure if this is intended - it wasn't like that before).

image

Cvnvr avatar Jul 01 '20 09:07 Cvnvr

Ye, I didn't test it with Unity 2019/2020. I Think it's relatively easy to fix that

PixeyeHQ avatar Jul 01 '20 10:07 PixeyeHQ

Could you suggest a fix? its just a few pixels off, no big deal though

amigax avatar Dec 10 '20 00:12 amigax

In EditorOverride.cs:

For the foldout icon increase the left padding from 10 to 20 box.padding = new RectOffset(20, 0, 10, 0); For the spacing issue (margins), underneath that line add this box.margin = new RectOffset(0, 0, 0, 0);

and underneath this line boxChild = new GUIStyle(GUI.skin.box); add this boxChild.margin = new RectOffset(0, 0, 0, 0);

haywirephoenix avatar May 13 '21 15:05 haywirephoenix