# Fishnet

FishNet HashGrid 샘플의 기법을 사용하여 Edgegap에서 Unity 프로젝트를 호스팅하는 방법을 탐색하세요.

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

## ✔️ 준비

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

* Unity 6 - [Unity Hub를 통해 다운로드](https://unity.com/releases/unity-6),
* FishNet Unity 패키지 - [Unity Asset Store에서 다운로드](https://assetstore.unity.com/packages/tools/network/fishnet-networking-evolved-207815),
  * 이 패키지에는 HashGrid 샘플이 포함되어 있습니다.

새 프로젝트를 만들고 위의 FishNet 패키지를 임포트하세요.

## ⚡ 배포 및 연결

### 1. Edgegap에 서버 배포

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

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

☑️ [FishNet HashGrid Sample 앱 버전으로 서버를 배포하세요](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에서 엽니다.

☑️ 폴더 FishNet / Demos / HashGrid / Scenes / HashGrid\_Demo.unity에서 씬을 엽니다.

☑️ 씬에서 NetworkManager 객체를 선택하고 Inspector에서 Tugboat 컴포넌트를 수정하세요:

* Client / Client Address를 다음으로 설정하세요 **호스트 URL** 이전 단계에서,
* Server / Port를 다음으로 설정하세요 **외부 포트** 이전 단계에서.

☑️ NetworkManager의 자식 게임 오브젝트를 확장하고 NetworkHudCanvas를 선택한 다음 다음을 설정하세요 `Auto Start Type`  에서 `사용 안 함`  에디터가 클라이언트-호스트 모드로 시작하는 것을 방지합니다.

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

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

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

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

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

서버 빌드가 제대로 시작되도록 하려면:

* 빌드 프로필을 편집하세요 (**빌드 설정 편집** Edgegap 플러그인)에서 씬을 추가하고,
* 설정 `Auto Start Type`  에서 `서버`  을 `NetworkHudCanvases`  컴포넌트 (의 자식 `을(를) 선택하고`),
* 활성화 `서버 주소 재사용` 을(를) 지정할 수 있습니다 `Tugboat`  오류를 방지하려면 컴포넌트를 `AddressAlreadyInUse`.

{% 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/fishnet-on-edgegap.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.
