Skip to content
프로젝트

소개

Godot GDExtension 개발을 위한 빠른 시작 템플릿

게임 및 에뮬레이션

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+2
in 15 days
+4
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

godot-cpp template

This repository serves as a quickstart template for GDExtension development with Godot 4.0+.

Contents

Usage - Template

To use this template, log in to GitHub and click the green "Use this template" button at the top of the repository page. This will let you create a copy of this repository with a clean git history.

To get started with your new GDExtension, do the following:

  • clone your repository to your local computer
  • initialize the godot-cpp git submodule via git submodule update --init
  • change the name of the compiled library file inside the SConstruct file by modifying the libname string.
    • change the paths of the to be loaded library name inside the project/bin/example.gdextension file, by replacing EXTENSION-NAME with the name you chose for libname.
  • change the entry_symbol string inside project/bin/example.gdextension file.
    • rename the example_library_init function in src/register_types.cpp to the same name you chose for entry_symbol.
  • change the name of the project/bin/example.gdextension file

Now, you can build the project with the following command:

scons

If the build command worked, you can test it with the project project. Import it into Godot, open it, and launch the main scene. You should see it print the following line in the console:

Type: 24

Configuring an IDE

You can develop your own extension with any text editor and by invoking scons on the command line, but if you want to work with an IDE (Integrated Development Environment), you can use a compilation database file called compile_commands.json. Most IDEs should automatically identify this file, and self-configure appropriately. To generate the database file, you can run one of the following commands in the project root directory:

# Generate compile_commands.json while compiling
scons compiledb=yes

# Generate compile_commands.json without compiling
scons compiledb=yes compile_commands.json

Usage - Actions

This repository comes with continuous integration (CI) through a GitHub action that tests building the GDExtension. It triggers automatically for each pushed change. You can find and edit it in builds.yml.

There is also a workflow (make_build.yml) that builds the GDExtension for all supported platforms that you can use to create releases. You can trigger this workflow manually from the Actions tab on GitHub. After it is complete, you can find the file godot-cpp-template.zip in the Artifacts section of the workflow run.

관련 프로젝트 살펴보기

불러오는 중…