A simple but effective IMGUI library for the Unity Engine for when EditorGUILayout is unavailable. It was created for internal use within my various tools and plugins
QGUI provides the LayoutController
that eases working with Rects by being able to reserve the demanded space within the rect, automatically applying padding and offsets for you
The following is an example of using QGUI's LayoutController
to emulate a HorizontalLayoutGroup
where EditorGUILayout
is unavailable
EditorGUILayout
EditorGUILayout.BeginHorizontal();
val1 = EditorGUILayout.Toggle(label1, val1, GUILayout.Width(100));
val2 = EditorGUILayout.Toggle(label2, val2);
EditorGUILayout.EndHorizontal();
QGUI
LayoutController layout = new LayoutController(rect);
val1 = EditorGUI.Toggle(layout.ReserveHorizontal(100), label1, val1);
val2 = EditorGUI.Toggle(layout.CurrentRect, label2, val2);
Starting with Unity 2019.3, the package manager UI has support for git packages
Click the +
to add a new git package and add https://github.com/QFSW/QGUI.git
as the source
To install via package manager, add the file Packages/manifest.json
and add the following line to the "dependencies"
"com.qfsw.qgui": "https://github.com/QFSW/QGUI.git"
Your file should end up like this
{
"dependencies": {
"com.qfsw.qgui": "https://github.com/QFSW/QGUI.git",
...
},
}