이 가이드에서는 Unreal Engine을 사용하여 앱에 인앱 리뷰를 통합하는 방법을 설명합니다. Kotlin 또는 자바, 네이티브 코드 또는 Unity를 사용하는 경우 별도의 통합 가이드를 참고하세요.
Unreal Engine SDK 개요
Play In-App Reviews API는 Play Core SDK 제품군의 일부입니다. Unreal Engine용 API는 RequestReviewFlow 및 LaunchReviewFlow 메서드를 사용하여 흐름을 요청하고 시작할 수 있는 UInAppReviewsManager 클래스를 제공합니다. 요청이 이루어지면 앱은 EInAppReviewErrorCode를 사용하여 요청 상태를 확인할 수 있습니다.
지원되는 Unreal Engine 버전
이 플러그인은 Unreal Engine 5.0 및 이후 모든 버전을 지원합니다.
개발 환경 설정
- GitHub 저장소에서 Play Unreal Engine 플러그인을 다운로드합니다. 
- Unreal Engine 프로젝트의 - Plugins폴더 내에 있는- GooglePlay폴더를 복사합니다.
- Unreal Engine 프로젝트를 열고 수정 → 플러그인을 클릭합니다. 
- Google Play를 검색하고 사용 설정됨 체크박스를 선택합니다. 
- 게임 프로젝트를 다시 시작하고 빌드를 트리거합니다. 
- 프로젝트의 - Build.cs파일을 열고- PublicDependencyModuleNames에- PlayInAppReviews모듈을 추가합니다.- using UnrealBuildTool; public class MyGame : ModuleRules { public MyGame(ReadOnlyTargetRules Target) : base(Target) { // ... PublicDependencyModuleNames.Add("PlayInAppReviews"); // ... } }
인앱 리뷰 흐름 요청
인앱 리뷰를 요청해야 하는 경우에 관한 안내에 따라 앱의 사용자 흐름에서 사용자에게 리뷰를 요청할 적절한 지점을 결정합니다 (예: 사용자가 게임의 레벨 끝에서 요약 화면을 닫은 후). 앱이 이러한 지점 중 하나에 가까워지면 다음 예와 같이 UInAppReviewsManager를 사용하여 작업을 만듭니다.
MyClass.h
void MyClass::OnReviewOperationCompleted(EInAppReviewErrorCode ErrorCode)
{
  // ...
}
MyClass.cpp
void MyClass::RequestReviewFlow()
{
  // Create a delegate to bind the callback function.
  FReviewOperationCompletedDelegate Delegate;
  // Bind the completion handler (OnReviewOperationCompleted) to the delegate.
  Delegate.BindDynamic(this, &MyClass::OnReviewOperationCompleted);
  // Initiate the review flow, passing the delegate to handle the result.
  GetGameInstance()
    ->GetSubsystem<UInAppReviewsManager>()
    ->RequestReviewFlow(Delegate);
}
- 이 메서드는 검토 작업 완료를 처리하는 - FRreviewOperationCompletedDelegate를 만듭니다.
- 대리자는 작업이 완료되면 호출되는 - OnReviewOperationCompleted메서드에 바인딩됩니다.
- BindDynamic함수는 대리자가 콜백에 올바르게 연결되도록 합니다.
- RequestReviewFlow(Delegate)메서드는 검토 프로세스를 시작하여 결과를 처리할 대리자를 전달합니다.
- 검토 작업은 비동기식으로 실행되므로 검토가 완료되는 동안 앱의 다른 작업이 계속될 수 있습니다. 
- 작업이 완료되면 - OnReviewOperationCompleted콜백이 성공 또는 실패를 비롯한 결과를 처리합니다.
인앱 리뷰 흐름 시작
RequestReviewFlow 작업이 완료되면 인앱 리뷰 흐름을 시작할 수 있습니다. 이는 완료 이벤트를 처리하도록 대리자를 바인딩하여 앱이 검토 요청의 결과 (성공 또는 실패)에 반응하도록 합니다.
MyClass.h
void MyClass::OnReviewOperationCompleted(EInAppReviewErrorCode ErrorCode)
{
  // ...
}
MyClass.cpp
void MyClass::LaunchReviewFlow()
{
  // Create a delegate to bind the callback function.
  FReviewOperationCompletedDelegate Delegate;
  // Bind the completion handler (OnReviewOperationCompleted) to the delegate.
  Delegate.BindDynamic(this, &MyClass::OnReviewOperationCompleted);
  // Launch the review flow, passing the delegate to handle the result.
  GetGameInstance()
    ->GetSubsystem<UInAppReviewsManager>()
    ->LaunchReviewFlow(Delegate);
}
다음 단계
앱의 인앱 검토 흐름 테스트를 통해 통합이 제대로 작동하는지 확인합니다.
