Skip to main content
Inspiring
April 24, 2017

Setting up Achievements in Unity

I've been trying to add achievements in Unity for my next VR release, but finding it really hard to get my head around the documentation and exactly how to call the API.
Are there any examples anywhere to see how it actually works? I guess I will figure it out at some point, but would be great to see some working code to understand this process better.

Thanks!
This topic has been closed for replies.

6 replies

Participant
April 26, 2017
Can you give an example of an achievement you'd like to implement, for example collecting x amount of items?

The 'VRHoops' sample app in the Platform SDK Unity folder has an implementation which is fairly straightforward.

Also our documentation has a couple examples:
https://developer3.oculus.com/documentation/platform/latest/concepts/dg-achievements/
Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations. Having an issue with our platform, services, or integrations? Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
Inspiring
April 27, 2017
@juanoldinho Thanks for the message, I'll have a look at VRHoops.

It's roughly that. I want to add achievements for travelled distance, which is just a float. So when you hit certain milestones in distance which unlock items in the game, I would love to give out an Oculus Achievement as well. 
Latest VR game: Crazy Kung Fu Other games: www.FieldOf .Vision
Inspiring
January 31, 2018
There is still something I don't understand here. There's a comment in the code: "true if the local user hit the achievement Count setup on the dashboard"
But the achievement Count isn't set in the Dashboard. The only things I have in the Dashboard are API name, Title and description. So if the code is assuming the count comes from the Dashboard, this isn't going to work for me as I don't have anywhere in the Dashboard to put a count.
Latest VR game: Crazy Kung Fu Other games: www.FieldOf .Vision
Inspiring
January 31, 2018
I realise now after writing my message (which helps) that in fact I am trying to make a Simple unlockable achievement whilst the code is talking about a Count unlockable achievement. Are there any examples for the Simple? Or is the Simple simply returning two values: 0 or 1.
Latest VR game: Crazy Kung Fu Other games: www.FieldOf .Vision
Inspiring
February 7, 2018
I'm still having issues with this. Haven't implemented this exactly how it is in the documentation, I still get a bunch of errors as soon as I call the event to unlock the achievement. Is this because it cannot work within Unity editor? If so, how can I test the achievements are working?
Latest VR game: Crazy Kung Fu Other games: www.FieldOf .Vision
New Participant
August 29, 2018
@FieldOfVision
Did you find a way around this? Were you able to solve this problem?