Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
Unity IMGUI extensions for Rapid prototyping/development.
The package is available on the openupm registry. It's recommended to install it via openupm-cli.
openupm add ga.fuquna.rapidgui
Add following lines to the
dependenciessection of the
Packages/manifest.json.
"ga.fuquna.rapidgui": "https://github.com/fuqunaga/RapidGUI.git"
.unitypackage
Download a
.unitypackagefile from the Release page.
value = RGUI.Field(value, label);
CustomClass
public class CustomClass { public int publicField;[SerializeField] protected int serializeField; [NonSerialized] public int nonSerializedField; [Range(0f, 10f)] public float rangeVal; public string longNameFieldWillBeMultiLine;
}
customClass = RGUI.Field(customClass, nameof(customClass));
csharp value = RGUI.Slider(value, min, max, label);- Display slider GUI according to type of numbers
csharp RGUI.MinMaxSlider(minMaxVal, minMaxRange, label); RGUI.MinMaxSlider(ref floatMin, ref floatMax, rangeMin, rangeMax, label);- Display min max slider GUI according to type of numbers - RapidGUI defines some basic MinMax type(
MinMaxInt,
MinMaxFloat,
MinMaxVector2...) - You can also create your own MinMax type by inheriting
MinMax
csharp selectionPopupIdx = RGUI.SelectionPopup(selectionPopupIdx, new[] { "One", "Two", "Three" }); selectionPopupStr = RGUI.SelectionPopup(selectionPopupStr, new[] { "One", "Two", "Three" });
// Initialize fold = new Fold("Fold"); fold.Add(() => GUILayout.Label("Added function"));
fold.DoGUI();
csharp // Initialize launcher = new WindowLauncher("WindowLauncher"); launcher.Add(() => GUILayout.Label("Added function"));
launcher.DoGUI();
- WindowLaunchers automatically adjusts the layout when opening a window
Please check the usage from the script below RapidGUI/Example/Scripts/
the object is a RapidGUI settings and update hooks.
If not in the scene, it will be generated automatically.
See PrefsGUI