Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foldout attribute looks off in Unity versions 2019/2020 #9

Open
gxbrxnth opened this issue Jul 1, 2020 · 3 comments · May be fixed by #19
Open

Foldout attribute looks off in Unity versions 2019/2020 #9

gxbrxnth opened this issue Jul 1, 2020 · 3 comments · May be fixed by #19

Comments

@gxbrxnth
Copy link

gxbrxnth commented Jul 1, 2020

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

@gxbrxnth gxbrxnth changed the title Render of foldout is offset in Unity 2019/2020 Foldout attribute looks off in Unity versions 2019/2020 Jul 1, 2020
@PixeyeHQ
Copy link
Owner

PixeyeHQ commented Jul 1, 2020

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

@amigax
Copy link

amigax commented Dec 10, 2020

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

@haywirephoenix
Copy link

haywirephoenix commented May 13, 2021

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 haywirephoenix linked a pull request Nov 18, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants