tutorials/scripting/cpp/gdextension_cpp_example #538
Replies: 3 comments 3 replies
-
|
The 'Creating a simple plugin' step states: "In our demo project, we'll create a scene containing a Node called "Main" and we'll save it as main.tscn. We'll come back to that later." Should this Node be a 2d Scene node or just a regular Node? |
Beta Was this translation helpful? Give feedback.
-
|
Here's a CMakeLists.txt I ended up with: cmake_minimum_required(VERSION 4.0)
project(godot_cpp_example)
set(CMAKE_CXX_STANDARD 26)
add_compile_definitions(TYPED_METHOD_BIND)
add_executable(${PROJECT_NAME}
src/gdexample.cpp
src/register_types.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE "godot-cpp/gen/include")
target_include_directories(${PROJECT_NAME} PRIVATE "godot-cpp/include")
target_include_directories(${PROJECT_NAME} PRIVATE "godot-cpp/gdextension")
Obviously, you won't use it to build the extension, but it helps with the code completion. Also I had to change the script at the end to otherwise it refused to work. I have no idea why, because this is my first time using Godot, so maybe I'm just doing something wrong. |
Beta Was this translation helpful? Give feedback.
-
|
Followed every step of the tutiral but when i go back to Godot, i can see the bin/ folder, but i can't see the .x86_64.dll from the Godot's folder, but if I open the folder from (for example) Vs Code, i can see it. Currently using Godot 4.5 on a Winodws 11 PC |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
tutorials/scripting/cpp/gdextension_cpp_example
Workflow overview: As a GDExtension, godot-cpp is more complicated to use than GDScript and C#. If you decide to work with it, here's what to expect your workflow to look like: Create a new go...
https://docs.godotengine.org/en/stable/tutorials/scripting/cpp/gdextension_cpp_example.html
Beta Was this translation helpful? Give feedback.
All reactions