Announcement

Collapse
No announcement yet.

Multiple Leaderboards

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple Leaderboards

    Anyone know of the correct way to reset ReadObject for a leaderboard read? I'm trying to set up multiple leaderboards to page through (10 levels, one leaderboard per level), and am using this code:

    Code:
    LeaderboardReadCompleteDelegateHandle = Leaderboards->OnLeaderboardReadCompleteDelegates.AddUObject(this, &AmyPlayerControllerBase::OnStatsReadComplete);
    ReadObject = MakeShareable(new FOnlineLeaderboardRead());
    ReadObject->LeaderboardName = StatName;
    ReadObject->SortedColumn = StatName;
    //because we're reading multiple leaderboards, we may need to reset this???
    ReadObject->ColumnMetadata.Empty();
    new (ReadObject->ColumnMetadata) FColumnMetaData(StatName, EOnlineKeyValuePairDataType::Int32);
    
    FOnlineLeaderboardReadRef ReadObjectRef = ReadObject.ToSharedRef();
    Leaderboards->ReadLeaderboardsAroundUser(UserId.ToSharedRef(), 5, ReadObjectRef);
    Earthborn Interactive | Flutter Bombs | MageWorks
Working...
X