Skip to content

Commit a77e5c8

Browse files
committed
Update README
1 parent 820a4b7 commit a77e5c8

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# C# GDExtension Bindgen
2-
WIP C# bindings generator for GDExtension classes
2+
Automatic C# bindings generator for GDExtension classes (Godot 4.4+)
33

44

55
## How to use
@@ -9,9 +9,24 @@ WIP C# bindings generator for GDExtension classes
99
4. Enjoy 🍾
1010

1111

12+
## How does it work?
13+
This editor plugin contains a single script [csharp_gdextension_bindgen.gd](addons/csharp_gdextension_bindgen/csharp_gdextension_bindgen.gd) with the whole C# code generation.
14+
It uses the reflection provided by [ClassDB](https://docs.godotengine.org/en/stable/classes/class_classdb.html) to generate bindings to enums, constants, properties, methods and signals for all classes registered using the GDExtension API.
15+
16+
The generated C# classes are in the `GDExtensionBindgen` namespace, so you'll need to add `using GDExtensionBindgen;` before using them.
17+
18+
The generated classes do not inherit from any `GodotObject` subclass because they are not C# scripts attached to the native objects, but rather a thin C# wrapper with strongly typed definitions of all members registered. Most of the time this addon tries to generate code that matches what Godot generates for C# for engine classes, e.g. you'll see `StringName`s cached using the `PropertyName`, `MethodName` and `SignalName` nested classes.
19+
20+
21+
## Caveats
22+
- Since generated classes do not inherit `GodotObject`, there's no easy way to create C# scripts that specify the wrapped GDExtension classes as their base class
23+
24+
1225
## TODO
1326
- [X] support constant integers that are not part of any enum
1427
- [X] get/set properties inherited from engine class directly without Get/Set
1528
- [X] support signals
16-
- [ ] submit to the Asset Library
29+
- [X] submit to the Asset Library
1730
- [X] cache StringNames
31+
- [ ] support packed arrays as method default values
32+
- [ ] support non-empty Arrays and Dictionaries as method default values

0 commit comments

Comments
 (0)