# Mirror Pong

Edgegap에서 Unity 프로젝트를 호스팅하는 방법을 다음에서 사용된 기법을 통해 알아보세요 [미러 팡 샘플](https://mirror-networking.gitbook.io/docs/manual/examples/pong).

{% embed url="<https://youtu.be/bvBkObGLTMk>" %}

## ✔️ 준비

시작하기 전에 다음이 필요합니다:

* Unity 6 - [Unity Hub를 통해 다운로드](https://unity.com/releases/unity-6),
* Mirror 유니티 패키지 - [Unity Asset Store에서 다운로드](https://assetstore.unity.com/packages/tools/network/mirror-129321),
  * 이 패키지에는 팡 샘플이 포함되어 있습니다.

새 프로젝트를 만들고 위의 Mirror 패키지를 가져오세요.

## ⚡ 배포 및 연결

### 1. Edgegap에 서버 배포

☑️ 시작하려면 다음이 필요합니다 [Edgegap에 무료 계정 생성](https://app.edgegap.com/auth/register). 신용카드가 필요 없습니다.

☑️ [애플리케이션에 대한 새 앱 버전 생성](https://app.edgegap.com/application-management/applications/mirror-pong-sample/versions/create), Mirror Pong 샘플을 선택하세요.

☑️ [Mirror Pong 샘플 앱 버전으로 서버를 배포하세요](https://app.edgegap.com/deployment-management/deployments/list).

☑️ [새 배포의 세부정보 열기](https://app.edgegap.com/deployment-management/deployments/list).

☑️ 배포의 고유한 일회성 연결 세부정보를 찾으세요:

* **호스트 URL** 형식 `780aa4260e83.pr.edgegap.net` ,
* **외부 포트** 형식 `30854`  (5자리).

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

### 2. 에디터에서 연결

☑️ 새 프로젝트를 Unity에서 엽니다.

☑️ Mirror / Examples / Pong / Scenes / MirrorPong.unity 폴더에서 장면을 여세요.

☑️ ▶️ 재생 버튼을 눌러 게임 클라이언트를 시작하세요.

☑️ 이전 단계의 연결 정보를 입력하세요.

☑️ 서버에 연결하려면 Client 버튼을 누르세요.

☑️ 두 번째 가상 플레이어를 연결하려면 [멀티플레이어 플레이 모드](https://docs-multiplayer.unity3d.com/mppm/current/about/) 또는 [ParrelSync](https://github.com/VeriorPies/ParrelSync).

🙌 Edgegap에서의 첫 배포를 축하합니다!

## ✏️ 서버 빌드 사용자화

{% hint style="success" %}
참고 [Unity](/docs.edgegap.com-ko/unity.md) Unity를 위해 **서버를 빌드하고 사용자화하는 방법 알아보기**.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.edgegap.com/docs.edgegap.com-ko/docs/sample-projects/unity-netcodes/mirror-pong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
