cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to unlock achievements

Welby
Adventurer
Hi,

I'm trying to do an achievements system as simplest as could be. I just need the easiest way to unlock a specific simple achievement.

I setup 15 achievements in the Oculus dashboard,I'm using the Oculus platform SDK and Unity 2017.3.1p4 and my code looks like that:
-----------------
void Start () {
        Oculus.Platform.Core.Initialize();
}


            if (Input.GetKeyDown(KeyCode.F2))
        {
            Oculus.Platform.Achievements.Unlock("Collector");
        }

-----------------

Something that simple.. I have an achievement called Collector on the dashboard obviusly. What Am I missing? What should I add to make it working? I'm finding the documentation really confusing and it mostly cover only Progressive achievements and not simple ones.

@imperativity

Thanks,
Andrea
1 ACCEPTED SOLUTION

Accepted Solutions

Welby
Adventurer
Alright sorry to multipost but at the end I figured this out. It works and achievements.unlock is just enough. I noticed they were resulting as unlocked in the notifications. Would be cool something to show in-game though. 

View solution in original post

3 REPLIES 3

Welby
Adventurer
Alright so at end I did something like previusly posted and i was able to check if the DLC was unlocked or not with the following code:

public void CheckForAchievmentUpdates()
    {
        Achievements.GetProgressByName(new string[] { FinalString }).OnComplete(
            (Message<AchievementProgressList> msg) =>
            {
                foreach (var achievement in msg.Data)
                {
                    if (achievement.Name == FinalString)
                    {
                        Debug.Log(achievement.Name + " :"+ achievement.IsUnlocked);
                    }
                }
            }
        );
    }

However I'm not sure  Oculus.Platform.Achievements.Unlock("Collector"); is enough to completely unlock the achievement or there's something else i should call to make sure the acheivement is unlocked and saved as such.


Welby
Adventurer
Alright sorry to multipost but at the end I figured this out. It works and achievements.unlock is just enough. I noticed they were resulting as unlocked in the notifications. Would be cool something to show in-game though. 

Welby
Adventurer
Ok everything works as expected. They are also shows in-game. You need to make a build to see them in the editor obviusly aren't visible. 

Silly me