Question by
Isfaq · Apr 19, 2019 at 03:14 PM ·
scalingeditorguilayoutdpi
How do you write editor extension for high dpi monitors?
In unity 2018.2, unity added dpi scaling in the editor, but I can't seem to find any documentation on it to write proper editor extension/Custom inspector.
Let's say I need to create an enumPopup with the size of Screen.width-50, I could write : EditorGUILayout.EnumPopup("Some Enum", EnumVar, GUILayout.Width(Screen.width - 50));
But then if I have set my monitor scaling to 125%, the enum overflows and goes out of the inspector in width. Screen.dpi doesn't seem to help much.
How do I solve it?
Comment