Skip to content

amuTBKT/ImGuiPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGuiPlugin

A simple plugin for integrating Dear ImGui in Unreal Engine 5.

⚠️About

  • The plugin is not production ready.
  • The plugin is just something silly built to add QOL improvements to editor.
  • The plugin is not compatible with UE4.

Installation

  • Clone the repo in GameProject/Plugins folder along with submodule dependency
    git clone --recurse-submodules [email protected]:amuTBKT/ImGuiPlugin.git
  • ImGui and Implot binaries need to be compiled separately. The way unreal build setup works makes it difficult to include third party libraries, so they have to be compiled separately.
    Source/Thirdparty/ImGui/Build.bat, might require some modifications to patch cmake reference and setting compiler options (visual studio version etc)
    Running the batch script should generate required libs under "/ImGuiPlugin/Source/Thirdparty/ImGui/Binaries" and "/ImGuiPlugin/Source/Thirdparty/ImGui/Intermediate" directories.
  • Include the plugin in your own modules.

👷Usage

At it's core the plugin is just a Slate widget with ImGui renderer, yes it's that simple :)
The plugin manages a global widget/window which can be used to add global widgets (managers, stats visualizer etc.)
User can also create SImGuiWidget widget which works like any other Slate widget with an addition of Tick delegate which can be used to add ImGui widgets.

Adding to main window

  • Using IMGUI_REGISTER_STATIC_WIDGET(InitFunction, TickFunction)
  • Dynamically binding to main window delegate
    UImGuiSubsystem* Subsystem = UImGuiSubsystem::Get();
    MainWindowTickHandle = Subsystem->GetMainWindowTickDelegate().Add(TickDelegate);`
    

Creating a standalone window

UImGuiSubsystem* Subsystem = UImGuiSubsystem::Get();
ImGuiWindow = Subsystem->CreateWindow("TestWindow", { 300., 300. }, TickDelegate);

Creating a slate widget

Users can create SImGuiWidget widget and add them to viewport or Slate containers, works similar to any other slate widget.

About

ImGui plugin for unreal engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published