Skip to content

Unreal Engine integration check🔗

We recommend you to check the MRGS integration during the initial setup and the subsequent updates. It can be done by calling just one method.

Step 1. Enable debug mode🔗

During the integration check, you will need to view the logs from the device. To enable logging, enable debug mode during the MRGS initialization.

#include "MRGService.h"

void AppGameMode::BeginPlay()
{

    if (!FMRGService::Get().IsInitialized())
    {
        FMRGServiceParams ServiceParams;
        ServiceParams.AppId = TEXT("<MRGS_APP_ID>");
        ServiceParams.AppSecret = TEXT("<CLIENT_SECRET>");

        // Set debug mode flag to true
        ServiceParams.bIsDebuggable = true;

        FMRGService::Get().Initialize(ServiceParams);
    }
}

Step 2. Call the integration check method🔗

For a correct integration check, it is necessary to perform a set of actions, which are described in the Installation section:

  • Call library initialization,
  • Call the game launch tracking method,
  • Set user id (if any),
  • Make a test payment.

Therefore, we recommend calling the integration check method when minimizing the application. Thus, you can complete all of the above actions, then minimize the application and see the check result.

#include "MRGService.h"

FMRGService::Get().CheckIntegration();

Getting check results as object

If the output to the log is inconvenient for you, then you can get integration check results as a object(string+result), for this, use the method:

#include "MRGService.h"

FMRGService::Get().CheckIntegration([](const FMRGSIntegrationCheckResult Result)
{
    UE_LOG(LogTemp, Verbose, TEXT("Received check result - %s"), Result.GeCheckResult());
});

Further steps vary depending on the platform. Learn how you can view integration reports in the Android integration check and iOS integration check sections.

Important

Make sure that this code does not get into the release of your application, e.g. you can call this method only in the test environment.


Last update: 2023-04-04
Created: 2023-04-04