Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
.gdextension 파일
소개
프로젝트의 .gdextension 파일에는 GDExtension을 로드하는 방법에 대한 지침이 포함되어 있습니다. 지침은 특정 섹션으로 구분됩니다. 이 페이지에서는 사용 가능한 다양한 옵션에 대한 간략한 개요를 제공합니다. C++(godot-cpp)를 시작하는 방법에 대한 소개는 :ref:`GDExtension C++ 예제 <doc_godot_cpp_getting_started>`를 참조하세요.
구성 섹선
속성 |
유형 |
설명 |
|---|---|---|
항목_기호 |
String |
GDExtension을 초기화하기 위한 입력 함수의 이름입니다. 이 함수는 godot-cpp를 사용할 때 |
컴파일링(Compiling) |
String |
최소 호환 버전. 이는 이전 버전의 Godot가 최신 버전의 Godot 기능에 의존하는 확장 기능을 로드하는 것을 방지합니다. Godot 4.1 이상에서만 지원됩니다 |
컴파일링(Compiling) |
String |
최대 호환 버전. 이는 최신 버전의 Godot가 확장 기능을 로드하는 것을 방지합니다. Godot 4.3 이상에서만 지원됩니다 |
release |
bool |
재컴파일 시 확장을 다시 로드합니다. Godot 4.2 이상에서는 godot-cpp 바인딩에 대해 다시 로드가 지원됩니다. 다른 언어 바인딩도 이를 지원할 수도 있고 지원하지 않을 수도 있습니다. 이 플래그는 주로 확장을 개발하거나 디버깅하는 데 사용됩니다. |
Android |
bool |
GDExtension은 :ref:`v2 Android 플러그인 <doc_android_plugin>`의 일부입니다. 내보내는 동안 이 플래그는 GDExtension 기본 공유 라이브러리가 Android 플러그인 AAR 바이너리에 의해 내보내졌음을 편집기에 표시합니다. |
프레임 선택
이 섹션에서는 GDExtension 라이브러리의 컴파일된 바이너리 경로를 설정할 수 있습니다. 기능 플래그를 지정하면 활성화된 기능 플래그에 따라 게임과 함께 로드하고 내보내야 하는 버전을 필터링할 수 있습니다. 모든 기능 플래그는 내보낸 게임에 로드되려면 Godot의 기능 플래그 또는 사용자 정의 내보내기 플래그와 일치해야 합니다. 예를 들어 macos.debug``는 Godot가 ``macos 및 debug 플래그를 모두 활성화한 경우 로드된다는 의미입니다. 섹션의 각 줄은 위에서 아래로 평가됩니다.
어떻게 작동하는 지의 예제입니다:
; A comment line starts with a semicolon. This line is ignored by the engine.
[libraries]
macos.debug = "./bin/libgdexample.macos.template_debug.dylib" ; Inline comments are also allowed.
macos.release = "./bin/libgdexample.macos.template_release.dylib"
windows.debug.x86_32 = "./bin/libgdexample.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "./bin/libgdexample.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "./bin/libgdexample.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "./bin/libgdexample.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "./bin/libgdexample.linux.template_debug.x86_64.so"
linux.release.x86_64 = "./bin/libgdexample.linux.template_release.x86_64.so"
linux.debug.arm64 = "./bin/libgdexample.linux.template_debug.arm64.so"
linux.release.arm64 = "./bin/libgdexample.linux.template_release.arm64.so"
linux.debug.rv64 = "./bin/libgdexample.linux.template_debug.rv64.so"
linux.release.rv64 = "./bin/libgdexample.linux.template_release.rv64.so"
경로는 상대 경로이거나 절대 경로일 수 있습니다(``res://``로 시작). 확장 프로그램이 경로에 지정된 폴더와 다른 폴더에 설치된 경우에도 계속 작동할 수 있도록 상대 경로를 사용하는 것이 좋습니다.
항목은 순서대로 일치하므로 두 개의 기능 태그 세트가 동일한 시스템과 일치할 수 있는 경우 보다 구체적인 태그를 먼저 배치하십시오.
[libraries]
linux.release.editor.x86_64 = "./bin/libgdexample.linux.template_release.x86_64.so"
linux.release.x86_64 = "./bin/libgdexample.linux.noeditor.template_release.x86_64.so"
다음은 사용 가능한 내장 옵션 중 일부 목록입니다(자세한 내용은 feature 태그 참조).
경고 시스템(Warning system)
깃발 |
설명 |
|---|---|
Windows |
경고 시스템(Warning system) |
마코스 |
경고 시스템(Warning system) |
리눅스 |
경고 시스템(Warning system) |
**ㅋㅋㅋㅋ |
경고 시스템(Warning system) |
리눅스BSD |
경고 시스템(Warning system) |
Android |
경고 시스템(Warning system) |
ios |
경고 시스템(Warning system) |
web |
호스트 OS가 웹 브라우저이다 |
빌드
깃발 |
설명 |
|---|---|
debug |
디버깅 기능으로 빌드(편집기 빌드에는 항상 디버깅 기능이 있음) |
release |
디버깅 기능 없이 최적화된 빌드 |
editor |
편집기 매뉴얼 |
텍스처
깃발 |
설명 |
|---|---|
mobile |
편집기 없는 빌드에서 실행 중 |
mobile |
편집기 없는 빌드에서 실행 중 |
x86_64 |
64비트에서 x86 빌드를 실행 중 |
arm64 |
64비트에서 ARM 빌드를 실행 중 |
64 |
64비트에서 ARM 빌드를 실행 중 |
위험 |
64비트 빌드에서 실행 중 (모든 구조) |
32 |
32비트에서 ARM 빌드를 실행 중 |
doc_inspector_plugins
기본적으로 Godot는 GDExtension 노드용 씬 도크에 있는 노드 아이콘을 사용합니다. 사용자 정의 아이콘은 SVG 파일의 이름과 리소스 경로를 참조하여 설정할 수 있습니다.
예를 들면:
[icons]
GDExample = "res://icons/gd_example.svg"
경로는 Import Dock의 이미지에 두 가지 옵션이 활성화된 16×16 픽셀 SVG 이미지를 가리켜야 합니다.
편집기 > 편집기 배율에 따른 배율 조정.
편집기 > 편집기 테마로 색상 변환.
두 옵션을 모두 활성화하면 아이콘이 스톡 편집기 아이콘과 최대한 가깝게 작동합니다. 자세한 내용은 아이콘 생성 가이드를 읽어보세요.
종속 관계 섹션
이 섹션에서는 GDExtension 종속성의 경로를 설정합니다. 이는 게임 실행 파일을 내보낼 때 종속성을 내보내는 데 내부적으로 사용됩니다. 내보낸 실행 파일의 기능 플래그에 따라 로드되는 종속성을 설정할 수 있습니다. 또한 종속성을 이동할 선택적 하위 디렉터리를 설정할 수 있습니다. 경로가 제공되지 않으면 Godot는 라이브러리를 게임 실행 파일과 동일한 디렉토리로 이동합니다.
경고
macOS에서는 ``Game.app/Contents/Frameworks``와 같은 디렉터리 구조를 갖는 ``Frameworks``라는 폴더 내에 공유 라이브러리가 있어야 합니다.
[dependencies]
macos.debug = {
"res://bin/libdependency.macos.template_debug.framework" : "Contents/Frameworks"
}
macos.release = {
"res://bin/libdependency.macos.template_release.framework" : "Contents/Frameworks"
}
windows.debug = {
"res://bin/libdependency.windows.template_debug.x86_64.dll" : "",
"res://bin/libdependency.windows.template_debug.x86_32.dll" : ""
}
windows.release = {
"res://bin/libdependency.windows.template_release.x86_64.dll" : "",
"res://bin/libdependency.windows.template_release.x86_32.dll" : ""
}
linux.debug = {
"res://bin/libdependency.linux.template_debug.x86_64.so" : "",
"res://bin/libdependency.linux.template_debug.arm64.so" : "",
"res://bin/libdependency.linux.template_debug.rv64.so" : ""
}
linux.release = {
"res://bin/libdependency.linux.template_release.x86_64.so" : "",
"res://bin/libdependency.linux.template_release.arm64.so" : "",
"res://bin/libdependency.linux.template_release.rv64.so" : ""
}