인앱 리뷰 통합(Unity)
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 가이드에서는 Unity를 사용하여 앱에 인앱 리뷰를 통합하는 방법을 설명합니다.
Kotlin 또는 Java, 네이티브 코드 또는 Unreal Engine을 사용하는 경우 별도의 통합 가이드를 참고하세요.
Unity SDK 개요
Play In-App Review API는 Play Core SDK 제품군의 일부입니다. Unity용 API는 RequestReviewFlow
및 LaunchReviewFlow
메서드를 사용하여 흐름을 요청하고 시작할 수 있는 ReviewManager
클래스를 제공합니다. 요청이 이루어지면 앱은 ReviewErrorCode
를 사용하여 요청 상태를 확인할 수 있습니다.
개발 환경 설정
OpenUPM-CLI
OpenUPM CLI가 설치되어 있으면 다음 명령어를 사용하여 OpenUPM 레지스트리를 설치할 수 있습니다.
openupm add com.google.play.review
OpenUPM
Unity 메뉴 옵션 Edit > Project Settings > Package Manager를 선택하여 패키지 관리자 설정을 엽니다.
패키지 관리자 창에 OpenUPM을 범위 지정된 레지스트리로 추가합니다.
Name: package.openupm.com
URL: https://package.openupm.com
Scopes: com.google.external-dependency-manager
com.google.play.common
com.google.play.core
com.google.play.review
Unity 메뉴 옵션 Window(창) > Package Manager(패키지 관리자)를 선택하여 패키지 관리자 메뉴를 엽니다.
관리자 범위 드롭다운을 설정하여 내 레지스트리를 선택합니다.
패키지 목록에서 Unity용 Google Play 무결성 플러그인 패키지를 선택하고 설치를 누릅니다.
GitHub에서 가져오기
GitHub에서 최신 .unitypackage
출시 버전을 다운로드합니다.
Unity 메뉴 옵션 Assets(애셋) > Import package(패키지 가져오기) > Custom Package(맞춤 패키지)를 선택하고 모든 항목을 가져와서 .unitypackage
파일을 가져옵니다.
ReviewManager 생성
앱과 Google Play API 간의 통신을 처리하는 ReviewManager
인스턴스를 만듭니다.
using Google.Play.Review;
// Create instance of ReviewManager
private ReviewManager _reviewManager;
// ...
_reviewManager = new ReviewManager();
ReviewInfo 객체 요청
인앱 리뷰를 요청해야 하는 경우에 관한 안내에 따라 앱의 사용자 흐름에서 사용자에게 리뷰를 요청할 적절한 지점을 결정합니다 (예: 사용자가 게임의 레벨 끝에서 요약 화면을 닫은 후). 앱이 이러한 지점 중 하나에 가까워지면 다음 예와 같이 ReviewManager
인스턴스를 사용하여 비동기 작업을 생성합니다.
var requestFlowOperation = _reviewManager.RequestReviewFlow();
yield return requestFlowOperation;
if (requestFlowOperation.Error != ReviewErrorCode.NoError)
{
// Log error. For example, using requestFlowOperation.Error.ToString().
yield break;
}
_playReviewInfo = requestFlowOperation.GetResult();
호출이 성공하면 API는 앱에서 인앱 리뷰 흐름을 시작하는 데 필요한 PlayReviewInfo
객체를 반환합니다. 이 예에서는 비동기 작업을 실행하기 위해 호출이 코루틴 내부에서 이루어집니다 (기본 스레드를 차단하지 않음). 호출이 비동기식으로 이루어지기 때문에 최대 몇 초 정도 걸릴 수 있습니다. 따라서 앱은 사용자 플로우에서 인앱 리뷰를 표시하려는 지점에 도달하기 전에 호출해야 합니다.
인앱 리뷰 흐름 시작
앱은 PlayReviewInfo
인스턴스를 수신한 이후 인앱 리뷰 흐름을 시작할 수 있습니다. PlayReviewInfo
객체는 제한된 시간 동안만 유효하므로 앱이 흐름을 시작하기 전에 너무 오래 기다리지 않아야 합니다.
var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);
yield return launchFlowOperation;
_playReviewInfo = null; // Reset the object
if (launchFlowOperation.Error != ReviewErrorCode.NoError)
{
// Log error. For example, using launchFlowOperation.Error.ToString().
yield break;
}
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
다음 단계
앱의 인앱 검토 흐름 테스트를 통해 통합이 제대로 작동하는지 확인합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Integrate in-app reviews (Unity)\n\nThis guide describes how to integrate in-app reviews in your app using Unity.\nThere are separate integration guides for if you are using [Kotlin or Java](/guide/playcore/in-app-review/kotlin-java),\n[native code](/guide/playcore/in-app-review/native) or [Unreal Engine](/guide/playcore/in-app-review/unreal-engine).\n\nUnity SDK overview\n------------------\n\nThe Play In-App Review API is part of [Play Core SDK](/reference/com/google/android/play/core/release-notes) family. The API for\nUnity offers a [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) class to request and launch the flow using\nthe [`RequestReviewFlow`](/reference/unity/class/Google/Play/Review/ReviewManager#requestreviewflow) and [`LaunchReviewFlow`](/reference/unity/class/Google/Play/Review/ReviewManager#launchreviewflow) methods. After a\nrequest is made, your app can check the status of the request using\n[`ReviewErrorCode`](/reference/unity/namespace/Google/Play/Review#reviewerrorcode).\n\nSet up your development environment\n-----------------------------------\n\n### OpenUPM-CLI\n\nIf you have the [OpenUPM CLI](https://github.com/openupm/openupm-cli#installation)\ninstalled you can install the OpenUPM registry with the following command: \n\n openupm add com.google.play.review\n\n### OpenUPM\n\n1. Open the [package manager settings](https://docs.unity3d.com/Manual/class-PackageManager.html)\n by selecting the Unity menu option\n **Edit \\\u003e Project Settings \\\u003e Package Manager**.\n\n2. Add OpenUPM as a scoped registry to the Package Manager window:\n\n Name: package.openupm.com\n URL: https://package.openupm.com\n Scopes: com.google.external-dependency-manager\n com.google.play.common\n com.google.play.core\n com.google.play.review\n\n3. Open the [package manager menu](//docs.unity3d.com/Manual/upm-ui-install.html) by selecting the Unity\n menu option **Window \\\u003e Package Manager**.\n\n4. Set the manager scope drop-down to select **My Registries**.\n\n5. Select the **Google Play Integrity plugin for Unity** package from the\n package list and press **Install**.\n\n### Import from GitHub\n\n1. Download the latest [`.unitypackage`](//github.com/google/play-in-app-reviews-unity/releases/latest)\n release from GitHub.\n\n2. Import the `.unitypackage` file by selecting the Unity menu option\n **Assets \\\u003e Import package \\\u003e Custom Package** and importing all items.\n\n| **Note:** By downloading and using Google Play Unity Plugins, you agree to the [Play Core Software Development Kit Terms of Service](/guide/playcore#license).\n\nCreate the ReviewManager\n------------------------\n\nCreate an instance of [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) that handles communication between\nyour app and the Google Play API. \n\n using Google.Play.Review;\n\n // Create instance of ReviewManager\n private ReviewManager _reviewManager;\n // ...\n _reviewManager = new ReviewManager();\n\nRequest a ReviewInfo object\n---------------------------\n\nFollow the guidance about [when to request in-app reviews](/guide/playcore/in-app-review#when-to-request) to determine good\npoints in your app's user flow to prompt the user for a review (for example,\nafter a user dismisses the summary screen at the end of a level in a game). When\nyour app gets close one of these points, use the [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) instance\nto create an async operation, as shown in the following example: \n\n var requestFlowOperation = _reviewManager.RequestReviewFlow();\n yield return requestFlowOperation;\n if (requestFlowOperation.Error != ReviewErrorCode.NoError)\n {\n // Log error. For example, using requestFlowOperation.Error.ToString().\n yield break;\n }\n _playReviewInfo = requestFlowOperation.GetResult();\n\nIf the call is successful, the API returns the [`PlayReviewInfo`](/reference/unity/class/Google/Play/Review/PlayReviewInfo) object\nthat your app needs to launch the in-app review flow. In the example, the call\nis made inside a [coroutine](https://docs.unity3d.com/Manual/Coroutines.html)\nto perform the async operation (this does not block the Main thread). Because\nthe call is made asynchronously, it might take up to a couple of seconds, so\nyour app should make the call before your app reaches the point in your user\nflow where you want to show the in-app review.\n\nLaunch the in-app review flow\n-----------------------------\n\nAfter your app receives the [`PlayReviewInfo`](/reference/unity/class/Google/Play/Review/PlayReviewInfo) instance, it can launch the\nin-app review flow. Note that the `PlayReviewInfo` object is only valid for a\nlimited amount of time, so your app should not wait too long before launching a\nflow. \n\n var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);\n yield return launchFlowOperation;\n _playReviewInfo = null; // Reset the object\n if (launchFlowOperation.Error != ReviewErrorCode.NoError)\n {\n // Log error. For example, using launchFlowOperation.Error.ToString().\n yield break;\n }\n // The flow has finished. The API does not indicate whether the user\n // reviewed or not, or even whether the review dialog was shown. Thus, no\n // matter the result, we continue our app flow.\n\nNext steps\n----------\n\n[Test your app's in-app review flow](/guide/playcore/in-app-review/test) to verify that your integration is\nworking correctly."]]