Skip to main content
New Participant
July 4, 2021

Achievements are not unlocking.

I've implemented them but no-one appears on the dashboard under Platform Services > Achievements as having achieved any. Under Data Use Checkup I have User ID and User Profile approved, and I am running the build downloaded from AppLab (I noted someone's comment that dev builds will not count in achievements to prevent cheating). The app is not yet released.

 

Note, I have leaderboards working fine.

 

Here is my code for unlocking achievements:

 

public void Achievement(string _name)
{

   if (platformInitialized)
   {
      print("OCULUS ACHIEVEMENT: " + _name);


      Achievements.GetAllDefinitions().OnComplete(
         (Message<AchievementDefinitionList> msg) =>
         {
            print("OCULUS AchievementDefinitionList callback success | " + msg.Data.Count.ToString());

            foreach (var achievement in msg.Data)
            {
               print("ACHIEVEMENT | " + achievement.Name);

            }
         }
      );

      Achievements.GetProgressByName(new string[] { _name }).OnComplete(
         (Message<AchievementProgressList> msg) =>
         {
            foreach (var achievement in msg.Data)
            {
               print("ACHIEVEMENT " + _name + ": already achieved? " + achievement.IsUnlocked);


               if (achievement.Name == _name && !achievement.IsUnlocked)
               {
                  Achievements.Unlock(_name);
               }
            }
         }
      );
   }
}


The first part prints out all the achievements correctly, but the second part does not unlock the achievement.

I have the achievements set up on the dashboard, and the api names I've set definitely correspond to the ones I'm calling. 

 

Am I missing something obvious?  Do Achievements only unlock once the game is released?  That's the only thing I can think of.

 

    This topic has been closed for replies.

    2 replies

    bio998Author
    New Participant
    July 4, 2021

    Oculus.Platform.Achievements.GetProgressByName(new string[] { _name }) returns Message<AchievementProgressList> msg of Count = 0 

     

    Even though I'm definitely passing the correct api name in.

    January 14, 2022

    Hello, bio998, are you find the answer? I'm trying to figure out how achievements works before releasing application