Hi, I've been looking through the documentation/forums but don't seem to see much info on how to implement Achievements 2017 on UWP. Any one willing to show a sample or point me in the right direction? Code (CSharp): public void UnlockWSAAchievement(int id, uint progress = 100) { //Debug.Log(currUser.Id + " " + currUser.UID + " " + id); if (currUser == null || !currUser.IsSignedIn) { return; } Debug.LogError("Achievement: " + ((AchievementType)(id - 1)) + " Progress: " + progress); try { //ConvertAchievementID is jutst to convert the ID to my achievement enum //Cant compile because this line gives me an error AchievementService.UpdateAchievementAsync(currUser.XboxUserId, ConvertAchievementID(id), 100); } catch (System.Exception ex) { Debug.LogError(ex.Message); } } I tried using AchievementService.UpdateAchievementAsync but it returns a Task so I'm not sure how to go about implementing it. It tells me an object reference is required for the non-static field, method or property 'AchievementService.UpdateAchievementAsync(string, string, uint)' Thanks
So I tried this Code (CSharp): public async Task UnlockWSAAchievement(int id, uint progress = 100) { //Debug.Log(currUser.Id + " " + currUser.UID + " " + id); #if ENABLE_WINMD_SUPPORT if (currUser == null || !currUser.IsSignedIn) { return; } #endif Debug.LogError("Achievement: " + ((AchievementType)(id - 1)) + " Progress: " + progress); try { return AchievementService.UpdateAchievementAsync(currUser.XboxUserId, ConvertAchievementID(id), 100); } catch (System.Exception ex) { Debug.LogError(ex.Message); } } But it's asking me to use await instead. When I use await, I would have to change all my methods which checks for unlocking achievements to async Tasks (and I have many methods which checks). Is there really no other way for achievements? I was recommended to use a XboxLiveContext object but the xboxLiveContext does not have a definition for AchievementService