ImGuiExamples
October 16, 2025 ยท View on GitHub
Sample project showcasing how to integrate ImGuiPlugin in Unreal projects.
Build Setup
- ImGuiExamples.uproject : Add ImGuiPlugin to the Plugins list.
- ImGuiExamples.Build.cs : Include "ImGui" and "ImGuiRuntime" module dependencies.
- ImGuiExamplesGameModule.cpp : Add call to
SETUP_DEFAULT_IMGUI_ALLOCATOR()in module startup function. - ImGuiTestWidget.cpp : A simple widget showcasing how to use different fonts and display slate icons in a standalone widget.
- ImGuiTestActor.cpp : Shows how to use ImGui widget with Actors.
Code Setup
- All ImGui code should be wrapped inside
#ifdef WITH_IMGUImacros. This is needed to ensure code continues to compile even when the ImGuiPlugin is disabled (manually or depending on build configuration) SETUP_DEFAULT_IMGUI_ALLOCATOR()needs to be called inside every module startup function which uses ImGui functions. This is needed to ensure memory allocation doesn't fail when making ImGui calls.