Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
기능 태그¶
소개¶
Godot는 기능의 사용 여부를 태그하는 특수 시스템을 갖고 있습니다. 각 기능은 문자열으로 나타나며, 다음과 같은 것을 언급할 수 있습니다:
플랫폼 이름.
플랫폼 구조 (64비트나 32비트, x86이나 ARM).
플랫폼 유형 (데스크톱, 모바일, 웹).
플랫폼에서 지원하는 텍스처 압축 알고리즘.
빌드가
디버그
인지출시
인지 여부 (디버그
는 편집기가 포함됨).프로젝트가 편집기에서 실행 중인지 "독립 실행형" 바이너리인지 여부.
더 많은 것들.
기능은 다음과 같이 호출하여 런타임에서 싱글톤 API로 부터 질문(query)을 받을 수 있습니다:
OS.has_feature(name)
OS.HasFeature(name);
OS feature tags are used by GDExtension to determine which libraries to load.
For example, a library for linux.debug.editor.x86_64
will be
loaded only on a debug editor build for Linux x86_64.
기본 기능¶
다음은 Godot의 대부분의 기능 태그 목록입니다. 이들은 대소문자을 구별합니다:
기능 태그 |
설명 |
---|---|
android |
Running on Android (but not within a Web browser) |
bsd |
Running on *BSD (but not within a Web browser) |
linux |
Running on Linux (but not within a Web browser) |
macos |
Running on macOS (but not within a Web browser) |
ios |
Running on iOS (but not within a Web browser) |
windows |
Windows에서 실행 중 |
linuxbsd |
Running on Linux or *BSD |
debug |
디버그 빌드에서 실행 중 (편집기를 포함) |
release |
출시 빌드에서 실행 중 |
editor |
편집기 빌드에서 실행 중 |
template |
Running on a non-editor (export template) build |
double |
Running on a double-precision build |
single |
Running on a single-precision build |
64 |
64비트 빌드에서 실행 중 (모든 구조) |
32 |
32빌드에서 실행 중 (모든 구조) |
x86_64 |
64비트에서 x86 빌드를 실행 중 |
x86_32 |
32비트에서 x86 빌드를 실행 중 |
x86 |
Running on an x86 build (any bitness) |
arm64 |
64비트에서 ARM 빌드를 실행 중 |
arm32 |
32비트에서 ARM 빌드를 실행 중 |
arm |
Running on an ARM build (any bitness) |
rv64 |
Running on a 64-bit RISC-V build |
riscv |
Running on a RISC-V build (any bitness) |
ppc64 |
Running on a 64-bit PowerPC build |
ppc32 |
Running on a 32-bit PowerPC build |
ppc |
Running on a PowerPC build (any bitness) |
wasm64 |
Running on a 64-bit WebAssembly build (not yet possible) |
wasm32 |
Running on a 32-bit WebAssembly build |
wasm |
Running on a WebAssembly build (any bitness) |
mobile |
호스트 OS가 모바일 플랫폼이다 |
pc |
호스트 OS가 PC 플랫폼이다 (데스크톱/랩톱) |
web |
호스트 OS가 웹 브라우저이다 |
web_android |
Host OS is a Web browser running on Android |
web_ios |
Host OS is a Web browser running on iOS |
web_linuxbsd |
Host OS is a Web browser running on Linux or *BSD |
web_macos |
Host OS is a Web browser running on macOS |
web_windows |
Host OS is a Web browser running on Windows |
etc |
ETC1 압축을 사용하는 텍스처를 지원한다 |
etc2 |
ETC2 압축을 사용하는 텍스처를 지원한다 |
s3tc |
S3TC (DXT/BC) 압축을 사용하는 텍스처를 지원한다 |
movie |
Movie Maker mode is active |
경고
With the exception of texture compression and movie
feature tags,
default feature tags are immutable. This means that they will not
change depending on run-time conditions. For example,
OS.has_feature("mobile")
will return false
when running a project
exported to HTML5 on a mobile device.
To check whether a project exported to HTML5 is running on a mobile device, call JavaScript code that reads the browser's user agent.
맞춤 기능¶
빌드에 맞춤 기능을 추가할 수 있습니다; 생성하기 위해 내보내기 프리셋에서 관련 필드를 사용하세요:
참고
Custom feature tags are only used when running the exported project (including with 원 클릭 배포). They are not used when running the project from the editor, even if the export preset marked as Runnable for your current platform has custom feature tags defined.
프로젝트 설정 재정의하기¶
기능을 사용하여 프로젝트 설정의 특정 구성 값을 재정의할 수 있습니다. 이를 통해 빌드를 작업할 때 모든 구성을 더 잘 커스터마이즈할 수 있습니다.
다음 예제에서, 게임의 데모 빌드를 위해 다른 아이콘이 추가되었습니다 (이것은 특수 내보내기 프리셋에서 커스터마이즈되었으며, 데모 레벨에만 있습니다).
재정의한 후, 지정된 구성을 위한 새로운 영역이 추가됩니다:
참고
:ref:`프로젝트 설정의 "override.cfg" <class_ProjectSettings>`를 사용할 때 기능 태그가 여전히 적용되고 있다는 사실을 기억하십시오. 따라서 원하는 기능 태그가 모든 플랫폼 및 구성에서 원본 프로젝트 설정을 재정의 하도록 하고 싶다면 그 기능 태그가 포함된 설정도 함께 재정의 해야 합니다.
기본 재정의¶
기본적으로 재정의를 통해 오는 많은 설정이 있습니다; 프로젝트 설정의 많은 섹션에서 이를 확인할 수 있습니다.
빌드 커스터마이징하기¶
Feature tags can be used to customize a build process too, by writing a custom ExportPlugin. They are also used to specify which shared library is loaded and exported in GDExtension.