If you see the below code, the engine default callback is assigned here, but then there is a “Event” calling system that is hard to follow and I’m not sure of any documentation on it. Please… some insight on this! thanks
/**
* Event triggered from Steam when the current user's stats have been downloaded from the backend
* Possible that the result fails if they have no data for the current game
*
* @param CallbackData All the valid data from Steam related to this event
*/
void FOnlineAsyncTaskManagerSteam::OnUserStatsReceived(UserStatsReceived_t* CallbackData)
{
const CGameID GameID(SteamSubsystem->GetSteamAppId());
if (GameID.ToUint64() == CallbackData->m_nGameID)
{
FUniqueNetIdSteam UserId(CallbackData->m_steamIDUser);
if (CallbackData->m_eResult != k_EResultOK)
{
if (CallbackData->m_eResult == k_EResultFail)
{
UE_LOG_ONLINE(Warning, TEXT("Failed to obtain steam user stats, user: %s has no stats entries"), *UserId.ToDebugString());
}
else
{
UE_LOG_ONLINE(Warning, TEXT("Failed to obtain steam user stats, user: %s error: %s"), *UserId.ToDebugString(),
*SteamResultString(CallbackData->m_eResult));
}
}
FOnlineAsyncEventSteamStatsReceived* NewEvent = new FOnlineAsyncEventSteamStatsReceived(SteamSubsystem, UserId, CallbackData->m_eResult);
UE_LOG_ONLINE(Verbose, TEXT("%s"), *NewEvent->ToString());
AddToOutQueue(NewEvent);
}
else
{
UE_LOG_ONLINE(Warning, TEXT("Obtained steam user stats, but for wrong game! Ignoring."));
}
}