https://github.com/fuqunaga/RapidGUI
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
https://github.com/fuqunaga/RapidGUI
gui imgui rapid rapid-development rapid-prototyping runtime unity unity3d
Last synced: 6 months ago
JSON representation
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
- Host: GitHub
- URL: https://github.com/fuqunaga/RapidGUI
- Owner: fuqunaga
- License: mit
- Created: 2019-05-14T06:42:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T10:09:49.000Z (over 2 years ago)
- Last Synced: 2025-04-07T07:15:36.305Z (7 months ago)
- Topics: gui, imgui, rapid, rapid-development, rapid-prototyping, runtime, unity, unity3d
- Language: C#
- Homepage:
- Size: 10.3 MB
- Stars: 345
- Watchers: 10
- Forks: 28
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- AwesomeCppGameDev - RapidGUI
README
# RapidGUI
[](https://openupm.com/packages/ga.fuquna.rapidgui/)
Unity IMGUI extensions for Rapid prototyping/development.

## Installation
### Install via OpenUPM
The package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli).
```
openupm add ga.fuquna.rapidgui
```
### Install via git URL
Add following lines to the `dependencies` section of the `Packages/manifest.json`.
```
"ga.fuquna.rapidgui": "https://github.com/fuqunaga/RapidGUI.git"
```
### Install via traditional `.unitypackage`
Download a `.unitypackage` file from the [Release page](https://github.com/fuqunaga/RapidGUI/releases).
## Getting Started
- Open and checkout the **RapidGUI/Example/RapidGUIExample.unity**
- see also the usage from the script below [**RapidGUI/Example/Scripts/**](Example/Scripts/)
## Functions
### RGUI.Field()

```csharp
value = RGUI.Field(value, label);
```
- Display standard GUI according to type of value
- Right-drag label to edit numbers
- Color picker
- Array/List has a right-click menu like inspector
- Supports custom class
**CustomClass**

```csharp
public class CustomClass
{
public int publicField;
[SerializeField]
protected int serializeField;
[NonSerialized]
public int nonSerializedField;
[Range(0f, 10f)]
public float rangeVal;
public string longNameFieldWillBeMultiLine;
}
```
```csharp
customClass = RGUI.Field(customClass, nameof(customClass));
```
### RGUI.Slider()

```csharp
value = RGUI.Slider(value, min, max, label);
```
- Display slider GUI according to type of numbers
### RGUI.MinMaxSlider()

```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`
### RGUI.SelectionPopup()

```csharp
selectionPopupIdx = RGUI.SelectionPopup(selectionPopupIdx, new[] { "One", "Two", "Three" });
selectionPopupStr = RGUI.SelectionPopup(selectionPopupStr, new[] { "One", "Two", "Three" });
```
### RapidGUI.Fold / Folds

```csharp
// Initialize
fold = new Fold("Fold");
fold.Add(() => GUILayout.Label("Added function"));
```
```csharp
fold.DoGUI();
```
### RapidGUI.WindowLauncher / WindowLaunchers

```csharp
// Initialize
launcher = new WindowLauncher("WindowLauncher");
launcher.Add(() => GUILayout.Label("Added function"));
```
```csharp
launcher.DoGUI();
```
- Toggle open/close window
- Resizable
- Has a close button

- WindowLaunchers automatically adjusts the layout when opening a window
### And more!!!
Please check the usage from the script below [**RapidGUI/Example/Scripts/**](Example/Scripts/)
## Tips
### A "RapidGUI" object appears in the hierarchy

the object is a RapidGUI settings and update hooks.
If not in the scene, it will be generated automatically.
## Save/Load parameters
See [PrefsGUI](https://github.com/fuqunaga/PrefsGUI)
## Reference
- **unity-immediate-color-picker**
https://github.com/mattatz/unity-immediate-color-picker
- **PrefsGUI**
https://github.com/fuqunaga/PrefsGUI