콘텐츠로 이동

실행 파라미터 반환

개요

실행 파라미터 조회는 게임 실행 URI에 추가한 실행 파라미터값을 게임 클라이언트에서 얻는 Hive SDK 기능입니다. 크로스플레이 런처로 앱을 실행했을 때 게임에 전달했던 실행 파라미터를 확인할 수 있습니다.

조회 방식

전달했던 실행 파라미터 값을 원본 문자열 형태로 받습니다.

예제 코드

예제 코드는 아래와 같습니다.

using hive;

PlatformHelper.getLaunchParameters((ResultAPI result, String parameters) => 
{
    if (result.success)
    {
        // API 호출 성공
        // parameters: 반환된 파라미터 값
    }
});
#include "HivePlatformHelper.h"

FHivePlatformHelper::getLaunchParameters(FHivePlatformHelperOnGetLaunchParametersDelegate::CreateLambda([this](const FHiveResultAPI& Result, const FString& Parameters) {
    if (Result.IsSuccess()) {
        // API 호출 성공
        // Parameters: 반환된 파라미터 값
    }
}));
#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

PlatformHelper::getLaunchParameters([=](ResultAPI const & result, string parameters) {
    if (result.isSuccess()) {
        // API 호출 성공
        // parameters: 반환된 파라미터 값
    }
});