# 더 많은 빌드 방법

이러한 접근 방식은 일반적으로 더 느리고 언리얼 엔진에 대한 더 깊은 이해를 필요로 합니다.

{% hint style="success" %}
참조 [](https://docs.edgegap.com/docs.edgegap.com-ko/unreal-engine "mention") Edgegap에서 언리얼 엔진 게임 서버 호스팅을 시작하는 첫걸음에 대해.
{% endhint %}

더 고급 언리얼 엔진 및 Edgegap 사용자를 위한 대체 빌드 방법을 살펴보세요:

1. [#build-from-containers](#build-from-containers "mention") 는 지속적 통합(Continuous Integration)에 적합한 빠르고 자동화된 방법입니다.
2. [#build-from-plugin](#build-from-plugin "mention") 는 언리얼 엔진을 소스에서 빌드해야 하는 이전(legacy) 빌드 방법입니다.

## ⚡ 스크립트로 빌드하기

스크립트로 빌드하는 것은 빠르고 완전 자동화되었으며 지속적 통합에 적합한 쉬운 방법입니다.

### 준비 <a href="#scripts-before-starting" id="scripts-before-starting"></a>

### 1. 프로젝트 구성 <a href="#scripts-configure-game-builds" id="scripts-configure-game-builds"></a>

### 2. 빌드 및 배포 <a href="#scripts-build-and-upload-to-edgegap" id="scripts-build-and-upload-to-edgegap"></a>

☑️ **Docker가 설치되어 실행 중인지 확인하십시오.**

{% embed url="<https://github.com/edgegap/edgegap-unreal-buildutils>" %}

☑️ **저희 Edgegap Build Utils 를 다운로드하세요** 아카이브에는 다음이 포함되어 있습니다:

* 플랫폼별 빌드 스크립트:
  * `BuildAndUpload.ps1`  윈도우용,
  * `BuildAndUpload.sh`  macOS 및 리눅스용,
* `Dockerfile`  - 도커 이미지 빌드 레시피,
* `dockerignore`  - 제거할 비필수 파일 목록으로 빌드를 빠르게 만듭니다,
* `StartServer.sh`  - 런타임에서 언리얼 엔진 수명주기를 관리하는 유틸리티 스크립트입니다.

☑️ **다음 폴더를 이동하세요 `edgegap-unreal-buildutils` 프로젝트 루트 디렉터리로.**

☑️ **다음 스크립트를 편집하세요 `BuildAndUpload`  플랫폼용 스크립트** 다음 항목들을 구성하려면:

* 리눅스 서버용으로 사전 빌드된 언리얼 엔진 이미지를 가져오기 위해 사용되는 깃허브 자격증명,
* 프로젝트 세부정보 - 엔진 버전, 서버 구성, .uproject 파일 이름,
* [Edgegap 레지스트리](https://app.edgegap.com/registry-management/repositories/list) 완성된 빌드를 업로드하는 데 사용되는 자격증명.

☑️ **편집한 스크립트를 실행하세요** 빌드 및 업로드 프로세스를 시작하려면. 이 단계를 완료하면 새 **이미지가 귀하의** [Edgegap 컨테이너 레지스트리 대시보드의 저장소 페이지에 추가됩니다](https://app.edgegap.com/registry-management/repositories/list).

☑️ 자동으로 리디렉션됩니다 **새로 만들기** [#app-versions](https://docs.edgegap.com/docs.edgegap.com-ko/learn/orchestration/application-and-versions#app-versions "mention") 에서 [대시보드](https://app.edgegap.com/application-management/applications/list)**.**

✅ 이제 다음 단계로 진행하거나 [#test-your-server-locally](#test-your-server-locally "mention").

## ⚡ 플러그인으로 빌드하기 <a href="#build-from-plugin" id="build-from-plugin"></a>

저희의 이전 플러그인은 고급 유틸리티를 포함하고 있으며 언리얼 엔진을 소스에서 빌드해야 합니다.

### 준비 <a href="#plugin-before-starting" id="plugin-before-starting"></a>

<details>

<summary>개발 환경 구성</summary>

* [언리얼 엔진 소스 코드 다운로드](https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-unreal-engine-source-code#downloadingthesourcecode).
* [비주얼 스튜디오 설정](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine).

</details>

<details>

<summary>공식 Edgegap 언리얼 엔진 플러그인 설치</summary>

공식 플러그인 중 하나를 선택하세요:

* 다운로드 [#integration-kit](https://docs.edgegap.com/docs.edgegap.com-ko/developer-tools#integration-kit "mention"),
* 또는 다운로드 [#legacy-plugin](https://docs.edgegap.com/docs.edgegap.com-ko/developer-tools#legacy-plugin "mention").

</details>

### 1. 프로젝트 구성 <a href="#scripts-configure-game-builds" id="scripts-configure-game-builds"></a>

☑️ [개발 머신에서 소스에서 귀하의 언리얼 엔진 버전을 빌드하십시오](https://dev.epicgames.com/documentation/en-us/unreal-engine/building-unreal-engine-from-source) 귀하의 개발 머신에서,

* 설치 [특정 릴리스 브랜치(예: ](https://github.com/EpicGames/UnrealEngine/tree/5.5)[`5.5`](https://github.com/EpicGames/UnrealEngine/tree/5.5)[)](https://github.com/EpicGames/UnrealEngine/tree/5.5) 안정된 기반에서 빌드하려면,
* **솔리드 스테이트 드라이브(SSD)를 사용하세요** 빌드 속도를 높이기 위해 (약 12시간 이상에서 약 2시간 이상으로 단축),
* 이는 처음 빌드하거나 언리얼 엔진 버전을 업그레이드할 때마다만 필요합니다.

{% hint style="warning" %}
**git 클라이언트로 브랜치를 다운로드하세요!** 깃허브 UI를 사용하면 항상 불안정한 `릴리스` 브랜치가 다운로드됩니다.
{% endhint %}

☑️ [언리얼 크로스 컴파일 툴체인 설치](https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine) 리눅스용 게임 서버를 빌드하기 위해.

☑️ **개발 머신을 재시작하세요**, 그렇지 않으면 나중에 오류가 발생할 수 있습니다!

### 2. 빌드 및 배포 <a href="#plugin-build-and-upload-to-edgegap" id="plugin-build-and-upload-to-edgegap"></a>

☑️ **Docker가 설치되어 실행 중인지 확인하십시오.**

☑️ [플러그인 재빌드](https://dev.epicgames.com/community/learning/tutorials/qz93/unreal-engine-building-plugins) 소스에서 빌드한 귀하의 맞춤형 언리얼 엔진 버전용으로.

☑️ **컴파일된 플러그인을 복사하세요** 다음으로 `Plugins` 폴더로 **언리얼 프로젝트의 루트 안에** (엔진이 아닌).

☑️ **새 언리얼 엔진을 실행하세요** 비주얼 스튜디오에서 그리고 **툴바 항목 Edit / Plugins 를 열고**.

☑️ **저희 플러그인을 활성화하세요** 섹션에서 **INSTALLED / Other**.

☑️ **플러그인 구성하기** 툴바 항목을 열어 **Edit / Project Settings / Edgegap**:

{% hint style="warning" %}
입력값을 편집한 후 항상 Enter를 눌러 **정상적으로 저장되었는지 확인하세요**.
{% endhint %}

* **API 토큰** 은 서버를 Edgegap에 업로드하는 데 필요합니다. 토큰을 얻으려면 Get Token을 클릭하세요.
* **애플리케이션 이름** Edgegap의 이름은 프로젝트 이름과 일치시키거나 사용자 정의할 수 있습니다. 소문자, 숫자, 대시(-) 또는 밑줄(\_) 문자만 사용하세요. `-` 그리고 언더스코어 `_`.
* **이미지 경로** 은 선택적으로 Edgegap에서 게임 서버의 사용자 지정 아이콘을 제공하며, 지금은 건너뛰어도 됩니다.
* **버전 이름** 은 클라이언트/서버 호환성을 추적하고 문제가 발생했을 때 롤백하는 데 유용합니다.
  * 타임스탬프는 앱 버전 이름으로 좋은 옵션입니다. 예: `2024.01.30-16.50.20-UTC` .
  * 여러 애플리케이션 버전이 동일한 이미지 태그를 가리킬 수 있습니다. 예: `v1.1.0` 그리고 `dev` .
  * 나중에 자세히 알아보세요. [application-and-versions](https://docs.edgegap.com/docs.edgegap.com-ko/learn/orchestration/application-and-versions "mention") 나중에.

{% hint style="warning" %}
**다시 사용하지 마세요 `latest` 버전** 시스템이 오래된(캐시된) 이미지를 배포하는 것을 방지하려면 사용하지 마세요.
{% endhint %}

☑️ 클릭하세요 **애플리케이션 생성.** 이 단계를 완료하면 **새 애플리케이션이 나타납니다** 에서 [Edgegap 대시보드](https://app.edgegap.com/application-management/applications/list).

☑️ 지금은 커스텀 컨테이너 레지스트리 설정을 건너뛰세요. 원하면 나중에 서드파티 레지스트리를 사용할 수 있습니다.

☑️ 구성에 만족하면 클릭하세요 **Build and Push**, 프로세스가 완료될 때까지 기다리고 언리얼 콘솔에 새로운 오류가 없는지 확인하세요. 이 단계를 완료하면 **프로젝트 루트에 새 폴더가 생성됩니다** - `Saved/LinuxServer`. 또한, **새 이미지가 이제 귀하의** [Edgegap 컨테이너 레지스트리 대시보드의 저장소 아래에 표시되며](https://app.edgegap.com/registry-management/repositories/list)그리고 새 [#app-versions](https://docs.edgegap.com/docs.edgegap.com-ko/learn/orchestration/application-and-versions#app-versions "mention") **가 귀하의** [대시보드의 애플리케이션 아래에 표시됩니다](https://app.edgegap.com/application-management/applications/list)**.**

☑️ 새 애플리케이션 버전에서 환경 변수 `TARGET_FILE_NAME`  을(를) 설정하여 `DefaultServerTarget`  값이 단계의 값과 일치하도록 하세요 [#id-2.-configure-game-server-builds-1](#id-2.-configure-game-server-builds-1 "mention").

✅ 이제 다음 단계로 진행할 수 있습니다.

## 👉 다음 단계

계속하기 [#id-5.-deploy-to-cloud](https://docs.edgegap.com/docs.edgegap.com-ko/unreal-engine/..#id-5.-deploy-to-cloud "mention") 저희의 [대시보드 배포](https://app.edgegap.com/deployment-management/deployments/list) 기능으로 이동하여 배포 중지, 주입된 변수 및 매개화, 서버 검색 가능성에 대해 자세히 알아보세요.
