Achievements are created as scriptable objects using enum Platforms. Create an achievement object and set platform ids to begin using. Platform ids will be found on the platforms portal after setting up the achievement.
...
/// <summary>
/// Unlock an achievement async
/// </summary>
/// <param name="achievement">The achievement scriptable object</param>
public static void UnlockAchievement(PlatformPlayer player, Achievement achievement)
{
if (player == null)
{
Debug.LogError("Player is null.");
return;
}
player.UnlockAchievement(achievement, (result, unlocked, progress) =>
{
if (result == PlatformPlayer.AchievementUpdateResult.Success)
{
Debug.Log(achievement.AchievementName + " successfully unlocked");
}
});
}
...