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
**For any project built against a stable release of Godot, we recommend using
46
-
this repository as a Git submodule, checking out the specific tag matching your
47
-
Godot version.**
25
+
Starting with version 10.x, godot-cpp is versioned independently from Godot. The godot-cpp version you
26
+
choose has no bearing on which Godot versions it is compatible with.
48
27
49
-
> As the `master` branch of Godot is constantly getting updated, if you are
50
-
> using `godot-cpp` against a more current version of Godot, see the instructions
51
-
> in the `gdextension` folder to update the relevant files.
28
+
Until we have a stable release branch, you can use the `master` branch, or choose any of the previous
29
+
version branches and tags for your project.
52
30
53
31
## Compatibility
54
32
55
33
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.
34
+
but not vice-versa. For example, a GDExtension targeting Godot 4.3 should work just fine
35
+
in Godot 4.4, but one targeting Godot 4.4 won't work in Godot 4.3.
36
+
37
+
You can specify which version you are targeting with the `api_version` option:
58
38
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).
39
+
```
40
+
scons api_version=4.3
41
+
```
42
+
43
+
... or by providing a custom `extension_api.json` generated by the Godot version you are
44
+
targeting:
45
+
46
+
```
47
+
godot --dump-extension-api
48
+
scons custom_api_file=extension_api.json
49
+
```
50
+
51
+
If you don't provide `api_version` or `custom_api_file`, then, by default, godot-cpp will
52
+
target the latest stable Godot version that it's aware of.
62
53
63
54
## Contributing
64
55
@@ -69,16 +60,8 @@ wish to help out, please visit the [godot-cpp section of the Contributing docs](
69
60
70
61
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
62
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:
63
+
Building your extension will create a shared library. To use this in your Godot project you'll need a `.gdextension`
0 commit comments