Forum Discussion
bio998
4 years agoHonored Guest
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.
2 Replies
Replies have been turned off for this discussion
- bio998Honored Guest
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.
- alicewithalex25Honored Guest
Hello, bio998, are you find the answer? I'm trying to figure out how achievements works before releasing application
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 2 years ago
- 3 months ago
- 6 months ago
- 28 days ago