https://github.com/flaxengine/imgui
Dear ImGui plugin for Flax Engine that adds debug GUI interface to game viewport.
https://github.com/flaxengine/imgui
cpp csharp flax flax-engine imgui
Last synced: about 2 months ago
JSON representation
Dear ImGui plugin for Flax Engine that adds debug GUI interface to game viewport.
- Host: GitHub
- URL: https://github.com/flaxengine/imgui
- Owner: FlaxEngine
- License: mit
- Created: 2022-10-26T10:52:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-12T09:45:01.000Z (3 months ago)
- Last Synced: 2025-03-26T01:02:45.517Z (2 months ago)
- Topics: cpp, csharp, flax, flax-engine, imgui
- Language: C++
- Homepage:
- Size: 1.16 MB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dear ImGui for Flax Engine

[Dear ImGui](https://github.com/ocornut/imgui) is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline-enabled application. It is fast, portable, renderer agnostic, and self-contained (no external dependencies). This repository contains a plugin project for [Flax Engine](https://flaxengine.com/) games with ImGui.
Minimum supported Flax version: `1.5`.
## Installation
0. Ensure to have proper system setup for C++ Scripting - see [Flax Docs](https://docs.flaxengine.com/manual/scripting/cpp/index.html)
1. Clone repo into `\Plugins\ImGui`
2. Add reference to ImGui project in your game by modyfying your game `.flaxproj` as follows:
```
...
"References": [
{
"Name": "$(EnginePath)/Flax.flaxproj"
},
{
"Name": "$(ProjectPath)/Plugins/ImGui/ImGui.flaxproj"
}
]
```3. Add reference to *ImGui* module in your game build script (eg. `Game.Build.cs`) as follows:
```cs
///
public override void Setup(BuildOptions options)
{
base.Setup(options);BuildNativeCode = false;
options.ScriptingAPI.IgnoreMissingDocumentationWarnings = true;// Add reference to ImGui
options.PrivateDependencies.Add("ImGui");
}
```4. Test it out!
Now you can use ImGui API directly in your game code within `Update` (scripts, plugins, anywhere within game logic update) as follows:
```cpp
// C++
#include "ImGui/imgui.h"void MyScript::OnUpdate()
{
ImGui::Text("Hello, world %d", 123);
ImGui::Button("Click");
}
``````cs
// C#
public override void OnUpdate()
{
ImGui.Text("Hello!");
ImGui.Button("Click");
}
```## License
Both this plugin and ImGui are released under **MIT License**.