# Setup Guide

## 기본 개발 환경 설정

**요구사항**

* MAXST VPS SDK는 Unity 2020 버전 이상을 권장합니다.
* Unity용 MAXST VPS SDK를 사용하기 위해서는 Unity 개발 도구와 Unity 개발에 대한 기본적인 지식이 필요합니다.
* Unity 개발 도구에 대한 자세한 정보는 [유니티 웹사이트](https://unity3d.com/)를 이용하시기 바랍니다.

## MAXST VPS Unity SDK 설치

1. **VPSSDKUnity** 를 다운로드 합니다.
2. Unity Project 열거나 새로 생성하세요.
3. 새로 생성 했을 경우,  **MAXSTVPSSDK\_0.8.0.unitypackage** 를 다운 받아 유니티에 설치 하세요.
4. **VPSData**를 다운 받아 위치에 맞는 VPS 공간지도를 설치해 주세요.

{% hint style="info" %}
해당 파일들 **이메일을** 통해 다운받으세요.
{% endhint %}

## Unity Setting

Unity의 File/Build Settings/Player Settings에 대한 설명 입니다.

{% hint style="danger" %}

* Android는 Other Settings의 Graphics APIs를 **OpenGLES3**만 선택되어야 합니다.
* Android는 **Multithreaded Rendering**의 체크를 해지해 주세요.
* Adnroid는 Publishing Settings에 C**ustom Main Manifest**와 **Custom Main Gradle Template**가 설치 되어야 합니다.&#x20;
  {% endhint %}

해당 **Manifest**와 **Gradle** 셋팅은 아래의 Github 링크를 참고 바랍니다.&#x20;

| Github Link                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------- |
| [AndroidManifest.xml](https://github.com/maxstdev/VPSSDKUnity/blob/main/Assets/Plugins/Android/AndroidManifest.xml) |
| [MainTemplate.gradle](https://github.com/maxstdev/VPSSDKUnity/blob/main/Assets/Plugins/Android/mainTemplate.gradle) |

{% hint style="warning" %}
iOS는 **Camera Usage Description 과 Location Usage Description**에 문구를 추가해 주세요.
{% endhint %}

## Editor Coroutines Package 설치&#x20;

MAXST VPS SDK는 Unity의 Editor Coroutines Package를 요구합니다.

{% hint style="danger" %}
아래와 같은 메시지가 발생 했을 경우에는 **Unity > Window > PackageManager > Editor Coroutines**을 검색하여 패키지를 설치합니다.
{% endhint %}

```
The type or namespace name 'EditorCoroutines' does not exist in the namespace ‘Unity'.  
```

## VPS 공간지도 설치

VPS 공간지도는 해당 지역의 메쉬와 레퍼런스 이미지, 시뮬레이션 데이터를 포함합니다. VPS 공간지도는 아래 그림과 같이 Unity Project 폴더와 동일 레벨에 VPSData 폴더를 생성하고 VPSData 하위에 저장되어야 합니다.

MAXST에서 제공하는 VPSData\_yangjae\_indoor.zip 파일을 Unity Project 폴더와 동일 레벤에서 압축을 압축을 해제하면 자동으로 VPSData 폴더 하위에 VPSMap 폴더와 VPSSimulationData 폴더가 있고 두 폴더 하위에는 yangjae\_indoor  폴더가 생성됩니다.

<div align="center"><img src="https://1450905769-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mb9Oux2ba8iUZ9sD7kL%2F-MbA43Pn5IsrdTJHNanO%2F-MbADJpiJ0u8f3pxGRzC%2Fimage.png?alt=media&#x26;token=487f3cf3-c12c-4444-a9b8-65a0a28dafdc" alt="VPS 공간지도 폴더 구조"></div>

{% hint style="warning" %}
반드시 **VPS 공간지도 폴더 구조**를 따라야만 VPS SDK에서 정상적으로 실행됩니다.
{% endhint %}
