USTRUCT()
struct FNSendLogCharacter
{
UPROPERTY()
FString NAME;
UPROPERTY()
FString PLAYER_ID;
UPROPERTY()
FString SERVER_ID;
UPROPERTY()
FString LEVEL;
UPROPERTY()
FString USERDATA;
}
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
{
FNSendLogCharacter info;
info.NAME = TEXT("tester");
info.PLAYER_ID = TEXT("player_id");
bool result = FGamePotSDKPluginModule::GetSharedGamePotSdk()->characterInfo(info.ToJsonString());
// 结果值true:验证成功。日志将发送到GAMEPOT服务器。
// 结果值false:验证失败。请确认logcat。
}
ex)
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject);
JsonObject->SetStringField("appversion", "1.0.23");
JsonObject->SetStringField("server", "s1");
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
FGamePotSDKPluginModule::GetSharedGamePotSdk()->setUserData(JsonObject);
void AGamePotSampleGameModeBase_Main::OnSetUserDataSuccess()
{
// 成功
}
void AGamePotSampleGameModeBase_Main::OnSetUserDataFailure(FNError NError)
{
// 失败
}