update to master (after 4.0.1-stable)

main
Nathan Franke 3 years ago
parent 90cffaedeb
commit b0efa6c9a8

@ -2,17 +2,12 @@
GDExtension template that automatically builds into a self-contained addon for the Godot Asset Library.
<!-- TODO: Change `master` to `4.x` on release (or `4.0`).
TODO: Change `godot4` to `godot` on release -->
# Compatibility warning:
This template is only intended to work with the latest `master` on GitHub, _not the latest point release, such as `beta1`_. Before reporting an issue, make sure you are on the latest `master` and the submodule `godot-cpp` is up-to-date by running the command `git submodule update --remote`.
### Getting started:
1. Clone this repository (or a new repository with this template) with submodules.
- `git clone --recurse-submodules https://github.com/nathanfranke/gdextension.git` \
- `cd gdextension`
2. Update to the latest `godot-cpp`.
- `git submodule update --remote`
2. Build a debug binary for the current platform.
- `scons`
3. Import, edit, and play `project/` using Godot Engine 4+.
@ -37,11 +32,11 @@ This template is only intended to work with the latest `master` on GitHub, _not
¹ Before distributing as an addon, all binaries for all platforms must be built and copied to the `bin/` directory. This is done automatically by GitHub Actions.
### Make it your own:
1. Rename `project/addons/example/` and `project/addons/example/example.gdextension`. The library name is automatically changed to the gdextension file name.
1. Rename `project/addons/example/` and `project/addons/example/example.gdextension`.
2. Replace `LICENSE`, `README.md`, and your code in `src/`.
3. Not required, but consider leaving a note about this template if you found it helpful!
### Distributing your extension on the Godot Asset Library:
### Distributing your extension on the Godot Asset Library with GitHub Actions:
1. Go to Repository→Actions and download the latest artifact.
2. Test the artifact by extracting the addon into a project.
3. Create a new release on GitHub, uploading the artifact as an asset.

@ -1 +1 @@
Subproject commit adf4802f4bd7fb7cafc1e94882df3f105d7f7afd
Subproject commit 9d1c396c54fc3bdfcc7da4f3abcb52b14f6cce8f

@ -1,4 +1,4 @@
# Ignore everything outside of the addons folder when exporting.
# Ignore everything outside of the addons folder when exporting, including Godot Asset Library.
/** export-ignore
/addons !export-ignore
/addons/** !export-ignore

@ -1,8 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://p4prpbgep4um"]
[ext_resource type="Script" path="res://demo/demo.gd" id="1_6gvlp"]
[node name="Demo" type="Node"]
script = ExtResource("1_6gvlp")
[node name="MyNode" type="MyNode" parent="."]

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://c7u64tpv6byvb"]
[ext_resource type="Script" path="res://demo/scene.gd" id="1_lih0m"]
[node name="Scene" type="Node"]
script = ExtResource("1_lih0m")
[node name="MyNode" type="MyNode" parent="."]

@ -10,6 +10,6 @@ config_version=5
[application]
config/name="example"
run/main_scene="res://demo/demo.tscn"
config/features=PackedStringArray("4.0")
config/name="project"
run/main_scene="res://demo/scene.tscn"
config/features=PackedStringArray("4.0", "Forward Plus")

@ -7,7 +7,7 @@ using namespace godot;
void MyNode::_bind_methods()
{
ClassDB::bind_method("hello_node", &MyNode::hello_node);
ClassDB::bind_method(D_METHOD("hello_node"), &MyNode::hello_node);
}
MyNode::MyNode()

@ -9,7 +9,7 @@ MySingleton *MySingleton::singleton = nullptr;
void MySingleton::_bind_methods()
{
ClassDB::bind_method("hello_singleton", &MySingleton::hello_singleton);
ClassDB::bind_method(D_METHOD("hello_singleton"), &MySingleton::hello_singleton);
}
MySingleton *MySingleton::get_singleton()

@ -1,7 +1,6 @@
#include "register_types.h"
#include <godot/gdnative_interface.h>
#include <gdextension_interface.h>
#include <godot_cpp/core/class_db.hpp>
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/classes/engine.hpp>
@ -37,7 +36,7 @@ void gdextension_terminate(ModuleInitializationLevel p_level)
extern "C"
{
GDNativeBool GDN_EXPORT gdextension_init(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization)
GDExtensionBool GDE_EXPORT gdextension_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization)
{
godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization);

Loading…
Cancel
Save