Hi,
I have implemented a leaderboard in my game and found that I need to have a minimum of 5 achievments in order to publish.
I put together a set and locally store if the achievement has been completed and if I have successfully uploaded the progress to google play, this allows a player to compelte them silently if offline then get them when they log on etc.
In my upload achievements I simply loop through my local achievement list, check if it has been completed and not uploaded and call.
Simply the loop is:
if (Social.localUser.authenticated)
{
for( int i = 0; i < m_xAchievements.Count; i++ )
{
if( m_xAchievements.m_bAchieved && !m_xAchievements*.m_bUploadedToGP )
_{_
Social.ReportProgress(m_xAchievements.m_sID,100.0,(bool success ) =>
_{
if( success )
{_
m_xAchievements.m_bUploadedToGP = true;
_}
});
}
}
}*
Is this the best way to do this or should I be waiting for a success/fail on each one before continuing the loop?
Cheers,
Bob_