# Unity SDK 빠른 시작

이 빠르고 간단한 예제를 사용하여 Pushwoosh Unity SDK를 시작하세요.

## 전제 조건

Pushwoosh Unity SDK를 앱에 통합하려면 다음이 필요합니다:

<TranslatedFragment id="prerequisites-plugins-unity" />

## 예제 프로젝트 다운로드

예제 프로젝트 저장소를 복제합니다:

```bash
git clone https://github.com/Pushwoosh/pushwoosh-unity-sample.git
```

## 프로젝트 구성

**Assets/Scripts/PushNotificator.cs**를 열고 Pushwoosh 초기화 값을 설정합니다:

```csharp title="Assets/Scripts/PushNotificator.cs"
Pushwoosh.ApplicationCode = "XXXXX-XXXXX";
Pushwoosh.FcmProjectNumber = "XXXXXXXXXXXX";
```

`ApplicationCode` 및 `FcmProjectNumber` 값을 **Pushwoosh 앱 코드** 및 **Firebase 프로젝트 번호**로 바꾸세요.

### iOS

###### 1. 번들 식별자 설정

Unity에서 **Edit > Project Settings > Player > iOS > Other Settings**로 이동하여 **Bundle Identifier**를 번들 ID(예: `com.example.pushwoosh`)로 설정합니다.

###### 2. 종속성 빌드 및 설치

Unity에서 iOS 프로젝트를 빌드합니다. 그런 다음 생성된 Xcode 프로젝트 디렉토리로 이동하여 CocoaPods 종속성을 설치합니다:

```bash
cd ios && pod install
```

###### 3. API 토큰 설정

Xcode에서 **ios/Unity-iPhone.xcworkspace** 파일을 엽니다.
`Info.plist`에 [Pushwoosh Device API Token](/ko/developer/api-reference/api-access-token/#device-api-token)을 추가합니다:

```xml title="Info.plist"
<key>Pushwoosh_API_TOKEN</key>
<string>__PUSHWOOSH_DEVICE_API_TOKEN__</string>
```

### Android

###### 1. 패키지 이름 설정

Unity에서 **Edit > Project Settings > Player > Android > Other Settings**로 이동하여 **Package Name**을 앱의 패키지 이름(예: `com.example.pushwoosh`)으로 설정합니다.

###### 2. google-services.json 추가

`google-services.json` 파일을 Unity 프로젝트의 **Assets** 디렉토리에 복사합니다.

###### 3. API 토큰 설정

`Assets/Plugins/Android/AndroidManifest.xml`의 `<application>` 태그 안에 [Pushwoosh Device API Token](/ko/developer/api-reference/api-access-token/#device-api-token)을 추가합니다:

```xml title="AndroidManifest.xml"
<meta-data android:name="com.pushwoosh.apitoken" android:value="__YOUR_DEVICE_API_TOKEN__" />
```

<Aside type="caution">
Pushwoosh Control Panel에서 토큰에 올바른 앱에 대한 액세스 권한을 부여해야 합니다. [자세히 알아보기](/ko/developer/api-reference/api-access-token/#edit-token)
</Aside>

## 프로젝트 실행

1. 프로젝트를 빌드하고 실행합니다.
2. **Register for push notifications** 버튼을 탭합니다.
3. 푸시 알림 권한을 부여합니다. 기기가 Pushwoosh에 등록됩니다.

## 푸시 알림 보내기

Pushwoosh Control Panel로 이동하여 등록된 기기로 [푸시 알림을 보냅니다](/ko/product/messaging-channels/push-notifications/send-push-notifications/one-time-push).