gdext-egui egui backend implementation for Godot 4
See Gif of working example(Reddit link, 2.8MiB~)
Usage
In Cargo.toml, under the [dependencies] tab
= { = "https://github.com/godot-rust/gdext", = "v0.2.2" }
= { = "https://github.com/kang-sw/gdext-egui", = "v0.2.0" }
In Rust, write a GodotClass derivative like this:
Unsafety
Bunch of unsafe blocks are used to implement drag and drop scheme between egui and godot
native ui. Generally it is considered safe since both of godot native and
Features
- Window support
- Basic Viewport
- Creation / Disposal
- Mouse Input Handling
- Editor extension
- In-editor viewport
- Text Input / IME support
- "GUEST MODE" Viewports
- Spawn EGUI layer onto any existing window, other than root viewport.
- Viewport Close Signal
- Drag-n-Drop
- <-> Godot Editor
- <-> OS File System
- Basic Viewport
- Rendering
- Clipping
- Utilities
- Expose GdScript API (Inherently, a class wrapper for frequently used methods)
- Property display (for editor integration)
Limitations
- Editor Plugin is still under development.
- IME support is sub-optimal.