https://github.com/tylkodemon/dear-imgui-unity
Unity package for Dear ImGui. Updated to include docking features, and URP support.
https://github.com/tylkodemon/dear-imgui-unity
dear-imgui dearimgui imgui-wrapper unity unity2022 unity3d-plugin urp
Last synced: 4 months ago
JSON representation
Unity package for Dear ImGui. Updated to include docking features, and URP support.
- Host: GitHub
- URL: https://github.com/tylkodemon/dear-imgui-unity
- Owner: TylkoDemon
- License: mit
- Fork: true (realgamessoftware/dear-imgui-unity)
- Created: 2023-10-03T18:08:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-14T16:52:02.000Z (5 months ago)
- Last Synced: 2024-12-14T17:29:20.510Z (5 months ago)
- Topics: dear-imgui, dearimgui, imgui-wrapper, unity, unity2022, unity3d-plugin, urp
- Language: C#
- Homepage:
- Size: 2.97 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Dear ImGui for Unity, dockable version
UPM package for the immediate mode GUI library, Dear ImGui (https://github.com/ocornut/imgui).

### Usage
- [Add package](https://docs.unity3d.com/Manual/upm-ui-giturl.html) from git URL: [https://github.com/TylkoDemon/dear-imgui-unity.git](https://github.com/TylkoDemon/dear-imgui-unity.git) .
- Drag an `ImGui Pass` prefab that can be found at `Packages/Dear ImGui/Resources/ImGui Pass.prefab` into your Bootstrap/Entry scene (it invokes DontDestroyOnLoad on itself).
- When using the Universal Render Pipeline, add a `Render Im Gui Feature` render feature to the renderer asset. Assign it to the `render feature` field of the DearImGui component.
- When using the HDRP, no extra setup is needed. Prefab is preconfigured to work just fine.
- When using the Inbuilt Renderer, no extra setup is needed.
- Subscribe to the `ImGuiUn.Layout` event and use ImGui functions.
- Example script:
```cs
using UnityEngine;
using ImGuiNET;public class DearImGuiDemo : MonoBehaviour
{
void OnEnable()
{
ImGuiUn.Layout += OnLayout;
}void OnDisable()
{
ImGuiUn.Layout -= OnLayout;
}void OnLayout()
{
ImGui.ShowDemoWindow();
}
}
```### Features
Full Dear Imgui implementation (based on [ImGui.NET](https://github.com/ImGuiNET/ImGui.NET)), version 1.76 with Docking features.
### See Also
This package uses Dear ImGui C bindings by [cimgui](https://github.com/cimgui/cimgui) and the C# wrapper by [ImGui.NET](https://github.com/mellinoe/ImGui.NET).
The development project for the package can be found at [https://github.com/TylkoDemon/dear-imgui-unity](https://github.com/TylkoDemon/dear-imgui-unity).
Full setup with examples of this package can be found at [https://github.com/TylkoDemon/Dear-Imgui-For-Unity](https://github.com/TylkoDemon/Dear-Imgui-For-Unity)
To draw IMGUI after UI in Camera-Space, this package utilizes HDRP-UI-Camera-Stacking which can be found at [https://github.com/alelievr/HDRP-UI-Camera-Stacking](https://github.com/alelievr/HDRP-UI-Camera-Stacking)
### Limitation
To draw Dear Imgui after Screen-Space Overlay UI, you need to use RenderingMode.IntoRenderTexture mode, which actually uses another Screen-Space Overlay canvas set to maximum render order, and draws our Imgui by using Raw Image.
This feature has been tested only on URP.# Unity Compatibility
This fork of dear-imgui-unity is currently developed by using `Unity 2022.3.10f1`