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 a list of known issues, and be sure to provide feedback on issues and PRs
65
65
> which affect your use of this extension.
66
66
67
+
## Godot and Godot Cpp Compatibility
68
+
69
+
If you intend to target both building as a GDExtension and as a module using godot repo, you can generate compatibility includes that will target either GDExtension or module, based on the GODOT_MODULE_COMPAT define.
70
+
71
+
If you want such a thing built, when running the build command, `scons`, make sure you have a file called `output_header_mapping_godot_cpp.json` at root level of this repo. This file needs to have the mappings from `godot` repo. The mappings can be generated by running the `compat_generator.py` script.
72
+
73
+
Example of how to run `compat_generator.py`:
74
+
75
+
```
76
+
git clone godotengine/godot
77
+
python compat_generator.py godot
78
+
```
79
+
80
+
The first argument of `compat_generator.py` is the folder where the repo is (can be godot or godot-cpp repo). If this folder is not given, the current directory is assumed. The output of this is either `output_header_mapping_godot.json` or `output_header_mapping_godot_cpp.json`
81
+
82
+
Then run the SConstruct build command as usual, and in the `gen/` folder you will now have a new folder, `include/godot_compat` which mirrors the `include/godot_cpp` includes, but have ifdef inside them and either include godot header or godot_cpp header.
83
+
67
84
## Contributing
68
85
69
86
We greatly appreciate help in maintaining and extending this project. If you
0 commit comments