Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realgamessoftware/dear-imgui-unity
Unity package for Dear ImGui
https://github.com/realgamessoftware/dear-imgui-unity
dear-imgui unity3d unity3d-package
Last synced: 4 months ago
JSON representation
Unity package for Dear ImGui
- Host: GitHub
- URL: https://github.com/realgamessoftware/dear-imgui-unity
- Owner: realgamessoftware
- License: mit
- Created: 2020-02-28T17:29:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-18T04:54:46.000Z (over 1 year ago)
- Last Synced: 2024-01-14T19:03:16.847Z (5 months ago)
- Topics: dear-imgui, unity3d, unity3d-package
- Language: C#
- Homepage:
- Size: 1.53 MB
- Stars: 436
- Watchers: 20
- Forks: 101
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Lists
- awesome-unity3d - dear-imgui-unity - Unity package for Dear ImGui. (Open Source Repositories / UI)
- awesome - realgamessoftware/dear-imgui-unity - Unity package for Dear ImGui (C\#)
README
# Dear ImGui for Unity
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/realgamessoftware/dear-imgui-unity.git .
- Add a `DearImGui` component to one of the objects in the scene.
- 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.
- 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();
}
}
```### 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/realgamessoftware/dear-imgui-unity-dev .