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.

편집기

새 클래스가 생성되어 스크립팅에 노출되면 편집기의 인터페이스에는 해당 클래스가 상속받은 기본 클래스를 나타내는 기본 아이콘이 표시됩니다. 대부분의 경우 사용자 경험을 개선하기 위해 새 클래스에 대한 아이콘을 만드는 것이 좋습니다.

콘텐츠 만들기

새 아이콘을 만들려면 먼저 벡터 그래픽 편집기가 설치되어 있어야 합니다. 예를 들어 오픈 소스 Inkscape 편집기를 사용할 수 있습니다.

모든 편집기 아이콘이 포함된 godot 저장소를 복제합니다.

git clone https://github.com/godotengine/godot.git

The icons must be created in a vector graphics editor in SVG format. There are three main requirements to follow:

  • 아이콘은 16×16이어야 합니다. Inkscape에서는 **파일 > 문서 속성**에서 문서 크기를 구성할 수 있습니다.

  • 더 낮은 DPI에서도 선명한 상태를 유지하려면 가능할 때마다 선을 픽셀에 맞춰야 합니다. 이를 더 쉽게 만들기 위해 Inkscape에서 16×16 격자를 만들 수 있습니다.

  • 사용자가 밝은 테마를 사용하도록 편집기를 구성한 경우 Godot는 `사전 정의된 색상 매핑 세트 <https://github.com/godotengine/godot/blob/master/editor/themes/editor_color_map.cpp>`__를 기반으로 아이콘 색상을 변환합니다. 이는 아이콘이 항상 충분한 명암비로 표시되도록 하기 위한 것입니다. 아이콘의 색상 팔레트를 위 목록에 있는 색상으로 제한해 보세요. 그렇지 않으면 밝은 배경에서 아이콘을 읽기 어려울 수 있습니다.

아이콘 디자인이 만족스러우면 복제된 저장소의 editor/icons 폴더에 아이콘을 저장합니다. 아이콘 이름은 대소문자를 구분하여 의도한 이름과 일치해야 합니다. 예를 들어 CPUParticles2D에 대한 아이콘을 만들려면 파일 이름을 ``CPUParticles2D.svg``로 지정합니다.

You can also browse all existing icons on the Godot editor icons website.

Import options for custom icons

For custom icons that are present in projects (as opposed to the engine source code), there are two import options you should enable:

Scaling for hiDPI displays

Icons need to be scaled properly on hiDPI displays to ensure they remain crisp and large enough to be readable.

To ensure the icon is rendered at a correct scale on hiDPI displays, select the SVG file in the FileSystem dock, enable the Editor > Scale with Editor Scale option in the Import dock and click Reimport. Note that this option is only available for icons in SVG format, as it requires the use of a vector format to work.

조명 편집기 테마의 색상 변환

To ensure the icon has its colors converted when the user is using a light theme, select the SVG file in the FileSystem dock, enable the Editor > Convert Colors with Editor Theme option in the Import dock and click Reimport. Note that this option is only available for icons in SVG format, as it requires the use of a vector format to work.

애니메이션

편집기는 로드 시 SVG를 한 번 렌더링하므로 효율적으로 구문 분석할 수 있도록 크기가 작아야 합니다. `사전 커밋 후크 <https://contributing.godotengine.org/en/latest/engine/guidelines/code_style.html#pre-commit-hook>`__이 실행되면 `svgo <https://github.com/svg/svgo>`_을 사용하여 SVG를 자동으로 최적화합니다.

참고

이 최적화 단계는 아이콘 품질에 눈에 띄는 영향을 미치지 않지만 가이드와 같은 편집자 전용 정보는 여전히 제거됩니다. 따라서 추가 변경이 필요한 경우 소스 SVG를 유지하는 것이 좋습니다.

쿼터니언(quaternions) 으로 보간하기

엔진 자체에 기여하는 경우 기본 저장소의 ``editor/icons``에 최적화된 아이콘을 추가하도록 풀 요청을 해야 합니다. 클래스에 대한 새 아이콘을 선택하도록 엔진을 다시 컴파일합니다.

모듈 내에서 사용자 정의 아이콘을 만드는 것도 가능합니다. 자신만의 모듈을 만들고 이를 Godot와 통합할 계획이 없다면 아이콘이 자체 포함될 수 있으므로 편집기 내에서 아이콘을 사용할 수 있도록 별도의 풀 요청을 만들 필요가 없습니다.

For specific instructions on how to create module icons, refer to Creating custom module icons.

문제 해결

편집기에 아이콘이 표시되지 않으면 다음을 확인하세요.

  1. 각 아이콘의 파일 이름은 앞에서 설명한 이름 지정 요구 사항과 일치합니다.

  2. The svg module is enabled at compile-time (it is enabled by default). Without this module, icons won't appear in the editor at all.

참조