Browse Source

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 <[email protected]>
Sietseq 3 năm trước cách đây
mục cha
commit
f95fdda58f
1 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 9 2
      tutorials/plugins/gdnative/gdnative-cpp-example.rst

+ 9 - 2
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 <https://godotengine.org/article/introducing-gd-extensions>`__ 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