A Dear ImGui binding for Godot 4.3+ using GDExtension (C++).
- Native C++ GDExtension implementation
- Direct integration with Godot's input system
- Compatible with Godot 4.3+
- Cross-platform support
- Add an
ImGuiGodotnode to your scene:
extends Node
var imgui: ImGuiGodot
func _ready() -> void:
imgui = ImGuiGodot.new()
imgui.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
add_child(imgui)- Use ImGui in your scripts:
var counter: int = 0
var slider_value: float = 0.5
var checkbox_value: bool = false
func _process(_delta):
if not imgui: return
if imgui.begin("ImGui Window !"):
imgui.text("Welcome to ImGui-Godot!")
if imgui.button("Button"):
print("Button clicked from GDScript!")
imgui.separator()
imgui.text("Counter: " + str(counter))
if imgui.button("Increment Counter"):
counter += 1
imgui.separator()
checkbox_value = imgui.checkbox("Test Checkbox", checkbox_value)
slider_value = imgui.slider_float("Test Slider", slider_value, 0.0, 1.0)
imgui.end()- Download
godot-imgui-addon.zip - Extract the
addonsfolder - Copy the
addons/godot-imguifolder into your Godot project'saddonsdirectory - Restart Godot or reload your project
- Python 3.6+
- SCons build system
- C++17 compatible compiler
- macOS: Xcode Command Line Tools
- Windows: Visual Studio 2019 or newer
- Linux: GCC 9+ or Clang 10+
- Git (for cloning with submodules)
- Clone the repository with submodules:
git clone --recurse-submodules https://github.com/D4r3NPo/godot-imgui.git
cd imgui-godotIf you already cloned without submodules:
git submodule update --init --recursive- Build for your platform:
scons platform=<macos|windows|linux> target=<template_debug|template_release>- The compiled library will be placed in
bin/
Open the demo folder in the Godot editor.
This project integrates:
- Dear ImGui (MIT License)
- godot-cpp (MIT License)