[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KR8YNMFS12JEBE22DS7KQ5":3,"skill-same:01M6KR8YNMFS12JEBE22DS7KQ5":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6KR8YNMFS12JEBE22DS7KQ5","gdextension",null,"Use when building native extensions for Godot — godot-cpp (C++) or gdext (Rust), binding classes, building, and GDScript\u002FC# interop","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgdextension\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30],"rust","cpp","use","c++","godot","binding","native","C#","extensions","for","gdscript","when","2026-11-10 10:12:30",false,"---\nname: gdextension\ndescription: Use when building native extensions for Godot — godot-cpp (C++) or gdext (Rust), binding classes, building, and GDScript\u002FC# interop\n---\n\n# GDExtension\n\nRun native C++ (or Rust) in Godot as a shared library **without recompiling the engine**. Use it for performance-critical code, wrapping existing C\u002FC++ libraries, or language bindings.\n\n> **Related skills:** **csharp-godot** for when C# is enough, **gdscript-advanced** for GDScript performance idioms first, **godot-optimization** for profiling before going native, **addon-development** for distributing the result, **export-pipeline** for shipping the binaries.\n\n---\n\n## 1. When to reach for GDExtension\n\nReach for GDScript or C# for almost all game logic. Choose GDExtension only when you genuinely need it:\n\n- **Native speed** in a hot loop that GDScript\u002FC# can't keep up with (profile first — see **godot-optimization**).\n- **Wrapping a C\u002FC++ library** you must call directly.\n- **Building a language binding**.\n\nContrast with **C++ modules**, which are compiled *into* the engine and therefore require shipping a custom engine binary. GDExtension's key advantage is that it runs against a **stock** Godot — you distribute just a shared library. It is \"more complicated to use than GDScript and C#,\" so don't reach for it by default.\n\n> ⚠️ **Changed in Godot 4.7:** The engine's built-in text servers (`text_server_adv`, `text_server_fb`) can no longer be built as GDExtensions — their `gdextension_build\u002F` scripts were removed. Writing your own text server as a GDExtension by subclassing `TextServerExtension` is unaffected. See [GH-117056](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F117056).\n\n---\n\n## 2. Project & build setup\n\n```bash\nmkdir gdextension_example && cd gdextension_example\ngit init\n# IMPORTANT: use the godot-cpp branch matching your target engine version (e.g. 4.3),\n# not the literal \"4.x\".\ngit submodule add -b 4.3 https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot-cpp\ncd godot-cpp && git submodule update --init && cd ..\n```\n\nDirectory layout:\n\n```\ngdextension_example\u002F\n├── project\u002F                # demo project to test the extension\n│   └── bin\u002Fexample.gdextension\n├── godot-cpp\u002F              # C++ bindings (submodule)\n└── src\u002F\n    ├── register_types.{h,cpp}\n    └── gdexample.{h,cpp}\n```\n\nBuild with `scons platform=\u003Cplatform>` (omit the platform to target the current one; default build is **debug**). The official `SConstruct` is a downloadable file from the C++ tutorial rather than hand-rolled here — follow godot-cpp's build docs. SCons is the official path; godot-cpp also supports CMake.\n\n> **Godot 4.7+:** Upstream's reference GDExtension interface files (e.g. `gdextension_interface.h`) now live in the godot-headers repository instead of godot-cpp ([GH-115401](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F115401)). godot-cpp consumes them from there, so the submodule workflow above is unchanged — this only matters if you vendor the raw interface headers directly (e.g. for a custom language binding).\n\n---\n\n## 3. Binding a class (C++)\n\nHeader (`gdexample.h`):\n\n```cpp\n#pragma once\n#include \u003Cgodot_cpp\u002Fclasses\u002Fsprite2d.hpp>\n\nnamespace godot {\nclass GDExample : public Sprite2D {\n    GDCLASS(GDExample, Sprite2D)\nprivate:\n    double time_passed = 0.0;\n    double amplitude = 10.0;\n    double speed = 1.0;\nprotected:\n    static void _bind_methods();\npublic:\n    void _process(double delta) override;\n    void set_amplitude(double p_amplitude);\n    double get_amplitude() const;\n    void set_speed(double p_speed);\n    double get_speed() const;\n};\n}\n```\n\nBindings (`gdexample.cpp` — `_bind_methods`):\n\n```cpp\nvoid GDExample::_bind_methods() {\n    ClassDB::bind_method(D_METHOD(\"get_amplitude\"), &GDExample::get_amplitude);\n    ClassDB::bind_method(D_METHOD(\"set_amplitude\", \"p_amplitude\"), &GDExample::set_amplitude);\n    ADD_PROPERTY(PropertyInfo(Variant::FLOAT, \"amplitude\"), \"set_amplitude\", \"get_amplitude\");\n\n    ClassDB::bind_method(D_METHOD(\"get_speed\"), &GDExample::get_speed);\n    ClassDB::bind_method(D_METHOD(\"set_speed\", \"p_speed\"), &GDExample::set_speed);\n    ADD_PROPERTY(PropertyInfo(Variant::FLOAT, \"speed\", PROPERTY_HINT_RANGE, \"0,20,0.01\"),\n                 \"set_speed\", \"get_speed\");\n\n    ADD_SIGNAL(MethodInfo(\"position_changed\",\n               PropertyInfo(Variant::OBJECT, \"node\"),\n               PropertyInfo(Variant::VECTOR2, \"new_pos\")));\n}\n```\n\nThe patterns:\n\n- **`GDCLASS(Class, Parent)`** — first line of every native class body; wires up the type into Godot's `ClassDB`.\n- **`ClassDB::bind_method(D_METHOD(\"name\", \"arg\"), &Class::method)`** — exposes a method (and names its arguments) so GDScript\u002FC#\u002Fthe editor can call it.\n- **`ADD_PROPERTY(PropertyInfo(...), setter, getter)`** — registers an Inspector property; bind the getter and setter *first*, then reference them here by name.\n- **`PROPERTY_HINT_RANGE`** with `\"0,20,0.01\"` turns the Inspector field into a slider (min, max, step).\n- **`ADD_SIGNAL(MethodInfo(\"name\", PropertyInfo(...), ...))`** — declares a signal with typed arguments; emit it from code with `emit_signal(\"position_changed\", this, new_pos)`.\n\n> ⚠️ **Changed in Godot 4.7:** The GDExtension interface functions `object_cast_to` and `classdb_get_class_tag` are deprecated in favor of `is_class`-based casts. Binding libraries such as godot-cpp handle this internally — but native code that calls these interface functions directly should migrate its cast paths. See [GH-119254](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F119254).\n\n---\n\n## 4. Entry point & the .gdextension file\n\nEntry point (`register_types.cpp`):\n\n```cpp\nvoid initialize_example_module(ModuleInitializationLevel p_level) {\n    if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) return;\n    GDREGISTER_CLASS(GDExample);\n}\nvoid uninitialize_example_module(ModuleInitializationLevel p_level) {\n    if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) return;\n}\nextern \"C\" {\nGDExtensionBool GDE_EXPORT example_library_init(\n    GDExtensionInterfaceGetProcAddress p_get_proc_address,\n    const GDExtensionClassLibraryPtr p_library,\n    GDExtensionInitialization *r_initialization) {\n    godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);\n    init_obj.register_initializer(initialize_example_module);\n    init_obj.register_terminator(uninitialize_example_module);\n    init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);\n    return init_obj.init();\n}\n}\n```\n\nThe `.gdextension` file (`project\u002Fbin\u002Fexample.gdextension`):\n\n```ini\n[configuration]\nentry_symbol = \"example_library_init\"\ncompatibility_minimum = \"4.3\"\nreloadable = true\n\n[libraries]\nmacos.debug = \"res:\u002F\u002Fbin\u002Flibgdexample.macos.template_debug.dylib\"\nmacos.release = \"res:\u002F\u002Fbin\u002Flibgdexample.macos.template_release.dylib\"\nwindows.debug.x86_64 = \"res:\u002F\u002Fbin\u002Fgdexample.windows.template_debug.x86_64.dll\"\nwindows.release.x86_64 = \"res:\u002F\u002Fbin\u002Fgdexample.windows.template_release.x86_64.dll\"\nlinux.debug.x86_64 = \"res:\u002F\u002Fbin\u002Flibgdexample.linux.template_debug.x86_64.so\"\nlinux.release.x86_64 = \"res:\u002F\u002Fbin\u002Flibgdexample.linux.template_release.x86_64.so\"\n```\n\nThe exported `extern \"C\"` symbol name **must equal** `entry_symbol`, or the extension won't load. Register classes with `GDREGISTER_CLASS`, gated on `MODULE_INITIALIZATION_LEVEL_SCENE`. The `[libraries]` keys are `platform.feature.arch` tags; `template_debug` \u002F `template_release` distinguish build configs. Optional sections: `[icons]` (per-node editor icon) and `[dependencies]` (extra libs copied on export).\n\n> **Godot 4.7+:** The raw GDExtension interface adds refcount-aware construction and registration entry points — `classdb_construct_object3` and `classdb_register_extension_class6` ([GH-118214](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F118214)). Binding libraries built against 4.7 headers use them automatically; they only concern code that calls the interface directly.\n\n---\n\n## 5. Compatibility rules\n\n**Forward-but-not-backward.** An extension targeting 4.2 works in 4.3, but one targeting 4.3 will **not** load in 4.2. **Exception:** extensions targeting 4.0 do not work in 4.1+.\n\n- The **godot-cpp branch must match** the engine version you build against.\n- `reloadable = true` hot reload works in the **editor only** — exported games never reload.\n- `compatibility_minimum` is required: set it to the lowest engine version you actually support. An older engine refuses to load the extension, and a value below `4.1` is rejected.\n- Exported games need the matching `template_release` binaries present, or the native node type simply won't exist at runtime.\n\n> ⚠️ **Changed in Godot 4.7:** `Object.is_class()` changed its `class` parameter type from `String` to `StringName` for performance. GDScript is unaffected and C# gained a compatibility method, but GDExtension binaries compiled against the old signature rely on the engine's compatibility mapping — rebuild against bindings matching your target version when updating to 4.7. See the [4.7 migration guide](https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Flatest\u002Ftutorials\u002Fmigrating\u002Fupgrading_to_godot_4.7.html).\n\n---\n\n## 6. Using it from GDScript and C#\n\nAfter building and placing the `.gdextension` file, the native class appears as a normal node type: bound properties show up in the Inspector (range hints become sliders) and signals appear in the Node dock.\n\n### GDScript\n\n```gdscript\nextends Node\n\nfunc _ready():\n    var node := GDExample.new()\n    node.speed = 2.0\n    node.position_changed.connect(_on_position_changed)\n    add_child(node)\n\nfunc _on_position_changed(node, new_pos):\n    print(\"%s is now at %s\" % [node.get_class(), new_pos])\n```\n\n### C# Equivalent\n\n```csharp\nusing Godot;\n\npublic partial class Demo : Node\n{\n    public override void _Ready()\n    {\n        \u002F\u002F No C# type exists for a GDExtension class: create it by name.\n        var node = ClassDB.Instantiate(\"GDExample\").As\u003CNode>();\n        node.Set(\"speed\", 2.0);\n        node.Connect(\"position_changed\", Callable.From\u003CNode, Vector2>(OnPositionChanged));\n        AddChild(node);\n    }\n\n    private void OnPositionChanged(Node node, Vector2 newPos)\n        => GD.Print($\"{node.GetClass()} is now at {newPos}\");\n}\n```\n\nTo get a strongly-typed C# wrapper you can ship a C# glue class, but the extension is fully usable via the dynamic `Set` \u002F `Connect` \u002F `Call` API shown above.\n\n> **Other languages & debugging:** [Rust (gdext)](references\u002Frust-gdext.md) · [Debugging native code](references\u002Fdebugging-native.md)\n\n---\n\n## Implementation Checklist\n\n- [ ] Confirmed native is actually needed (profiled; GDScript\u002FC# insufficient — see **godot-optimization**)\n- [ ] godot-cpp submodule on the branch matching the target engine version\n- [ ] `_bind_methods` binds every exposed method\u002Fproperty\u002Fsignal\n- [ ] `entry_symbol` in `.gdextension` matches the exported `extern \"C\"` symbol\n- [ ] `compatibility_minimum` set to the lowest engine version you support\n- [ ] `[libraries]` has correct paths for every shipped platform\u002Farch (debug + release)\n- [ ] Release export includes the `template_release` binaries\n","# GDExtension\n\nRun native C++ (or Rust) in Godot as a shared library **without recompiling the engine**. Use it for performance-critical code, wrapping existing C\u002FC++ libraries, or language bindings.\n\n> **Related skills:** **csharp-godot** for when C# is enough, **gdscript-advanced** for GDScript performance idioms first, **godot-optimization** for profiling before going native, **addon-development** for distributing the result, **export-pipeline** for shipping the binaries.\n\n---\n\n## 1. When to reach for GDExtension\n\nReach for GDScript or C# for almost all game logic. Choose GDExtension only when you genuinely need it:\n\n- **Native speed** in a hot loop that GDScript\u002FC# can't keep up with (profile first — see **godot-optimization**).\n- **Wrapping a C\u002FC++ library** you must call directly.\n- **Building a language binding**.\n\nContrast with **C++ modules**, which are compiled *into* the engine and therefore require shipping a custom engine binary. GDExtension's key advantage is that it runs against a **stock** Godot — you distribute just a shared library. It is \"more complicated to use than GDScript and C#,\" so don't reach for it by default.\n\n> ⚠️ **Changed in Godot 4.7:** The engine's built-in text servers (`text_server_adv`, `text_server_fb`) can no longer be built as GDExtensions — their `gdextension_build\u002F` scripts were removed. Writing your own text server as a GDExtension by subclassing `TextServerExtension` is unaffected. See [GH-117056](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F117056).\n\n---\n\n## 2. Project & build setup\n\n```bash\nmkdir gdextension_example && cd gdextension_example\ngit init\n# IMPORTANT: use the godot-cpp branch matching your target engine version (e.g. 4.3),\n# not the literal \"4.x\".\ngit submodule add -b 4.3 https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot-cpp\ncd godot-cpp && git submodule update --init && cd ..\n```\n\nDirectory layout:\n\n```\ngdextension_example\u002F\n├── project\u002F                # demo project to test the extension\n│   └── bin\u002Fexample.gdextension\n├── godot-cpp\u002F              # C++ bindings (submodule)\n└── src\u002F\n    ├── register_types.{h,cpp}\n    └── gdexample.{h,cpp}\n```\n\nBuild with `scons platform=\u003Cplatform>` (omit the platform to target the current one; default build is **debug**). The official `SConstruct` is a downloadable file from the C++ tutorial rather than hand-rolled here — follow godot-cpp's build docs. SCons is the official path; godot-cpp also supports CMake.\n\n> **Godot 4.7+:** Upstream's reference GDExtension interface files (e.g. `gdextension_interface.h`) now live in the godot-headers repository instead of godot-cpp ([GH-115401](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F115401)). godot-cpp consumes them from there, so the submodule workflow above is unchanged — this only matters if you vendor the raw interface headers directly (e.g. for a custom language binding).\n\n---\n\n## 3. Binding a class (C++)\n\nHeader (`gdexample.h`):\n\n```cpp\n#pragma once\n#include \u003Cgodot_cpp\u002Fclasses\u002Fsprite2d.hpp>\n\nnamespace godot {\nclass GDExample : public Sprite2D {\n    GDCLASS(GDExample, Sprite2D)\nprivate:\n    double time_passed = 0.0;\n    double amplitude = 10.0;\n    double speed = 1.0;\nprotected:\n    static void _bind_methods();\npublic:\n    void _process(double delta) override;\n    void set_amplitude(double p_amplitude);\n    double get_amplitude() const;\n    void set_speed(double p_speed);\n    double get_speed() const;\n};\n}\n```\n\nBindings (`gdexample.cpp` — `_bind_methods`):\n\n```cpp\nvoid GDExample::_bind_methods() {\n    ClassDB::bind_method(D_METHOD(\"get_amplitude\"), &GDExample::get_amplitude);\n    ClassDB::bind_method(D_METHOD(\"set_amplitude\", \"p_amplitude\"), &GDExample::set_amplitude);\n    ADD_PROPERTY(PropertyInfo(Variant::FLOAT, \"amplitude\"), \"set_amplitude\", \"get_amplitude\");\n\n    ClassDB::bind_method(D_METHOD(\"get_speed\"), &GDExample::get_speed);\n    ClassDB::bind_method(D_METHOD(\"set_speed\", \"p_speed\"), &GDExample::set_speed);\n    ADD_PROPERTY(PropertyInfo(Variant::FLOAT, \"speed\", PROPERTY_HINT_RANGE, \"0,20,0.01\"),\n                 \"set_speed\", \"get_speed\");\n\n    ADD_SIGNAL(MethodInfo(\"position_changed\",\n               PropertyInfo(Variant::OBJECT, \"node\"),\n               PropertyInfo(Variant::VECTOR2, \"new_pos\")));\n}\n```\n\nThe patterns:\n\n- **`GDCLASS(Class, Parent)`** — first line of every native class body; wires up the type into Godot's `ClassDB`.\n- **`ClassDB::bind_method(D_METHOD(\"name\", \"arg\"), &Class::method)`** — exposes a method (and names its arguments) so GDScript\u002FC#\u002Fthe editor can call it.\n- **`ADD_PROPERTY(PropertyInfo(...), setter, getter)`** — registers an Inspector property; bind the getter and setter *first*, then reference them here by name.\n- **`PROPERTY_HINT_RANGE`** with `\"0,20,0.01\"` turns the Inspector field into a slider (min, max, step).\n- **`ADD_SIGNAL(MethodInfo(\"name\", PropertyInfo(...), ...))`** — declares a signal with typed arguments; emit it from code with `emit_signal(\"position_changed\", this, new_pos)`.\n\n> ⚠️ **Changed in Godot 4.7:** The GDExtension interface functions `object_cast_to` and `classdb_get_class_tag` are deprecated in favor of `is_class`-based casts. Binding libraries such as godot-cpp handle this internally — but native code that calls these interface functions directly should migrate its cast paths. See [GH-119254](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F119254).\n\n---\n\n## 4. Entry point & the .gdextension file\n\nEntry point (`register_types.cpp`):\n\n```cpp\nvoid initialize_example_module(ModuleInitializationLevel p_level) {\n    if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) return;\n    GDREGISTER_CLASS(GDExample);\n}\nvoid uninitialize_example_module(ModuleInitializationLevel p_level) {\n    if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) return;\n}\nextern \"C\" {\nGDExtensionBool GDE_EXPORT example_library_init(\n    GDExtensionInterfaceGetProcAddress p_get_proc_address,\n    const GDExtensionClassLibraryPtr p_library,\n    GDExtensionInitialization *r_initialization) {\n    godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);\n    init_obj.register_initializer(initialize_example_module);\n    init_obj.register_terminator(uninitialize_example_module);\n    init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);\n    return init_obj.init();\n}\n}\n```\n\nThe `.gdextension` file (`project\u002Fbin\u002Fexample.gdextension`):\n\n```ini\n[configuration]\nentry_symbol = \"example_library_init\"\ncompatibility_minimum = \"4.3\"\nreloadable = true\n\n[libraries]\nmacos.debug = \"res:\u002F\u002Fbin\u002Flibgdexample.macos.template_debug.dylib\"\nmacos.release = \"res:\u002F\u002Fbin\u002Flibgdexample.macos.template_release.dylib\"\nwindows.debug.x86_64 = \"res:\u002F\u002Fbin\u002Fgdexample.windows.template_debug.x86_64.dll\"\nwindows.release.x86_64 = \"res:\u002F\u002Fbin\u002Fgdexample.windows.template_release.x86_64.dll\"\nlinux.debug.x86_64 = \"res:\u002F\u002Fbin\u002Flibgdexample.linux.template_debug.x86_64.so\"\nlinux.release.x86_64 = \"res:\u002F\u002Fbin\u002Flibgdexample.linux.template_release.x86_64.so\"\n```\n\nThe exported `extern \"C\"` symbol name **must equal** `entry_symbol`, or the extension won't load. Register classes with `GDREGISTER_CLASS`, gated on `MODULE_INITIALIZATION_LEVEL_SCENE`. The `[libraries]` keys are `platform.feature.arch` tags; `template_debug` \u002F `template_release` distinguish build configs. Optional sections: `[icons]` (per-node editor icon) and `[dependencies]` (extra libs copied on export).\n\n> **Godot 4.7+:** The raw GDExtension interface adds refcount-aware construction and registration entry points — `classdb_construct_object3` and `classdb_register_extension_class6` ([GH-118214](https:\u002F\u002Fgithub.com\u002Fgodotengine\u002Fgodot\u002Fpull\u002F118214)). Binding libraries built against 4.7 headers use them automatically; they only concern code that calls the interface directly.\n\n---\n\n## 5. Compatibility rules\n\n**Forward-but-not-backward.** An extension targeting 4.2 works in 4.3, but one targeting 4.3 will **not** load in 4.2. **Exception:** extensions targeting 4.0 do not work in 4.1+.\n\n- The **godot-cpp branch must match** the engine version you build against.\n- `reloadable = true` hot reload works in the **editor only** — exported games never reload.\n- `compatibility_minimum` is required: set it to the lowest engine version you actually support. An older engine refuses to load the extension, and a value below `4.1` is rejected.\n- Exported games need the matching `template_release` binaries present, or the native node type simply won't exist at runtime.\n\n> ⚠️ **Changed in Godot 4.7:** `Object.is_class()` changed its `class` parameter type from `String` to `StringName` for performance. GDScript is unaffected and C# gained a compatibility method, but GDExtension binaries compiled against the old signature rely on the engine's compatibility mapping — rebuild against bindings matching your target version when updating to 4.7. See the [4.7 migration guide](https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Flatest\u002Ftutorials\u002Fmigrating\u002Fupgrading_to_godot_4.7.html).\n\n---\n\n## 6. Using it from GDScript and C#\n\nAfter building and placing the `.gdextension` file, the native class appears as a normal node type: bound properties show up in the Inspector (range hints become sliders) and signals appear in the Node dock.\n\n### GDScript\n\n```gdscript\nextends Node\n\nfunc _ready():\n    var node := GDExample.new()\n    node.speed = 2.0\n    node.position_changed.connect(_on_position_changed)\n    add_child(node)\n\nfunc _on_position_changed(node, new_pos):\n    print(\"%s is now at %s\" % [node.get_class(), new_pos])\n```\n\n### C# Equivalent\n\n```csharp\nusing Godot;\n\npublic partial class Demo : Node\n{\n    public override void _Ready()\n    {\n        \u002F\u002F No C# type exists for a GDExtension class: create it by name.\n        var node = ClassDB.Instantiate(\"GDExample\").As\u003CNode>();\n        node.Set(\"speed\", 2.0);\n        node.Connect(\"position_changed\", Callable.From\u003CNode, Vector2>(OnPositionChanged));\n        AddChild(node);\n    }\n\n    private void OnPositionChanged(Node node, Vector2 newPos)\n        => GD.Print($\"{node.GetClass()} is now at {newPos}\");\n}\n```\n\nTo get a strongly-typed C# wrapper you can ship a C# glue class, but the extension is fully usable via the dynamic `Set` \u002F `Connect` \u002F `Call` API shown above.\n\n> **Other languages & debugging:** [Rust (gdext)](references\u002Frust-gdext.md) · [Debugging native code](references\u002Fdebugging-native.md)\n\n---\n\n## Implementation Checklist\n\n- [ ] Confirmed native is actually needed (profiled; GDScript\u002FC# insufficient — see **godot-optimization**)\n- [ ] godot-cpp submodule on the branch matching the target engine version\n- [ ] `_bind_methods` binds every exposed method\u002Fproperty\u002Fsignal\n- [ ] `entry_symbol` in `.gdextension` matches the exported `extern \"C\"` symbol\n- [ ] `compatibility_minimum` set to the lowest engine version you support\n- [ ] `[libraries]` has correct paths for every shipped platform\u002Farch (debug + release)\n- [ ] Release export includes the `template_release` binaries\n",{"name":5,"description":7},"master","d7b26cdb5fae14d4ef7b713c5bf259395e75c3c6","skills\u002Fgdextension",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add jame581\u002FGodotPrompter --skill gdextension",{"tool":51,"command":52},"bunx","bunx skills add jame581\u002FGodotPrompter --skill gdextension",{"tool":54,"command":55},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill gdextension","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgdextension\u002FSKILL.md",true,[59,65],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fdebugging-native.md","REFERENCE","参考文档",2315,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgdextension\u002Freferences\u002Fdebugging-native.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Frust-gdext.md",1998,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgdextension\u002Freferences\u002Frust-gdext.md",[70,89,110,140,164,182],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":31},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[77,78,30,79,23,80,81,82,83,84,85,21,86,87,88],"xr development","development","deployment","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":31},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[96,97,98,99,100,101,102,103,21,30,23,104,105,106,107,108,109],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":121,"publishedAt":31},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[97,122,123,124,125,126,127,128,105,129,130,30,131,132,133,134,135,136,21,137,138,139],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio","server",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":154,"publishedAt":31},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[146,149],{"categoryNo":147,"categoryName":148,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":150,"categoryName":151,"taxonomyType":152,"taxonomyTypeDesc":153},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[23,155,156,157,158,21,159,160,161,162,163],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":31},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[171,172,21,173,174,175,176,177,178,179,180,30,181],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","common","implementing","sequences",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":31},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[189,190,191,23,30,192,193,194,195,196,157,21,180,197],"state","state machine","machine","patterns","node","fsm","state machines","trade","trade-offs"]