From f95fdda58f2e8141d12d59f6ea152f90ba6bb351 Mon Sep 17 00:00:00 2001 From: Sietseq <59657884+Sietseq@users.noreply.github.com> Date: Wed, 3 Nov 2021 10:30:22 -0300 Subject: [PATCH] GDNative: Specify to use the 3.x branch (#5354) GDExtensions has been merged into the godot-cpp master branch. The tutorial should specify to use the 3.x branch if the reader is creating GDNative scripts. Co-authored-by: Hugo Locurcio --- tutorials/plugins/gdnative/gdnative-cpp-example.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tutorials/plugins/gdnative/gdnative-cpp-example.rst b/tutorials/plugins/gdnative/gdnative-cpp-example.rst index ca2a7c18b..23a272382 100644 --- a/tutorials/plugins/gdnative/gdnative-cpp-example.rst +++ b/tutorials/plugins/gdnative/gdnative-cpp-example.rst @@ -46,6 +46,13 @@ between 3.0 and 3.1) but not vice versa so make sure you download the correct branch. Also note that the version of Godot you use to generate the ``api.json`` with becomes your minimum version. +.. note:: + + `GDExtension `__ has been merged in the ``master`` branch of godot-cpp, + but it is only compatible with the upcoming Godot 4.0. + Therefore, you need to use the ``3.x`` branch of godot-cpp to use GDNative + and follow this example. + If you are versioning your project using Git, it is a good idea to add them as Git submodules: @@ -55,7 +62,7 @@ Git submodules: mkdir gdnative_cpp_example cd gdnative_cpp_example git init - git submodule add https://github.com/godotengine/godot-cpp + git submodule add -b 3.x https://github.com/godotengine/godot-cpp cd godot-cpp git submodule update --init @@ -80,7 +87,7 @@ Do make sure you clone recursive to pull in both repositories: mkdir gdnative_cpp_example cd gdnative_cpp_example - git clone --recursive https://github.com/godotengine/godot-cpp + git clone --recursive -b 3.x https://github.com/godotengine/godot-cpp .. code-tab:: none Godot 3.0