Skip to content

Commit

Permalink
Bug fix PlayGamesAchievement.cs
Browse files Browse the repository at this point in the history
Fixes:
1- Method "LoadImage" always returning null;
2- "hidden" property returning false when achievement had already been unlocked, this issue also made "LoadImage" return null values.
  • Loading branch information
DanielGrave authored Oct 1, 2022
1 parent b3df542 commit b722ce1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal PlayGamesAchievement(Achievement ach) : this()
}

this.mCompleted = ach.IsUnlocked;
this.mHidden = !ach.IsRevealed;
this.mHidden = !ach.IsRevealed && !ach.IsUnlocked;
this.mLastModifiedTime = ach.LastModifiedTime;
this.mTitle = ach.Name;
this.mDescription = ach.Description;
Expand Down Expand Up @@ -135,8 +135,10 @@ private Texture2D LoadImage()
{
#if UNITY_2017_1_OR_NEWER
mImageFetcher = UnityWebRequestTexture.GetTexture(url);
mImageFetcher.SendWebRequest();
#else
mImageFetcher = new WWW(url);
mImageFetcher.Send();
#endif
mImage = null;
}
Expand Down Expand Up @@ -283,4 +285,4 @@ public int points
}
}
}
#endif
#endif

0 comments on commit b722ce1

Please sign in to comment.