You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GDExtensions targeting an earlier version of Godot should work in later minor versions,
56
-
but not vice-versa. For example, a GDExtension targeting Godot 4.2 should work just fine
57
-
in Godot 4.3, but one targeting Godot 4.3 won't work in Godot 4.2.
38
+
but not vice-versa. For example, a GDExtension targeting Godot 4.3 should work just fine
39
+
in Godot 4.4, but one targeting Godot 4.4 won't work in Godot 4.3.
40
+
41
+
You can specify which version you are targeting with the `api_version` option:
58
42
59
-
There is one exception to this: extensions targeting Godot 4.0 will _not_ work with
60
-
Godot 4.1 and later.
61
-
See [Updating your GDExtension for 4.1](https://docs.godotengine.org/en/latest/tutorials/migrating/upgrading_to_godot_4.1.html#updating-your-gdextension-for-godot-4-1).
43
+
```
44
+
scons api_version=4.3
45
+
```
46
+
47
+
... or by providing a custom `extension_api.json` generated by the Godot version you are
48
+
targeting:
49
+
50
+
```
51
+
godot --dump-extension-api
52
+
scons custom_api_file=extension_api.json
53
+
```
54
+
55
+
If you don't provide `api_version` or `custom_api_file`, then, by default, godot-cpp will
56
+
target the latest stable Godot version that it's aware of.
62
57
63
58
## Contributing
64
59
@@ -69,16 +64,8 @@ wish to help out, please visit the [godot-cpp section of the Contributing docs](
69
64
70
65
You need the same C++ pre-requisites installed that are required for the `godot` repository. Follow the [official build instructions for your target platform](https://docs.godotengine.org/en/latest/engine_details/development/compiling/index.html).
71
66
72
-
Getting started with GDExtensions is a bit similar to what it was for 3.x but also a bit different.
73
-
74
-
This new approach is much more akin to how core Godot modules are structured.
75
-
76
-
Compiling this repository generates a static library to be linked with your shared lib,
77
-
just like before.
78
-
79
-
To use the shared lib in your Godot project you'll need a `.gdextension`
80
-
file, which replaces what was the `.gdnlib` before.
81
-
See [example.gdextension](test/project/example.gdextension) used in the test project:
67
+
Building your extension will create a shared library. To use this in your Godot project you'll need a `.gdextension`
0 commit comments