Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
FieldOfVision's avatar
FieldOfVision
Heroic Explorer
8 years ago

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!

6 Replies

Replies have been turned off for this discussion
  • @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. 
  • 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.
  • 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.
  • 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?
  • @FieldOfVision
    Did you find a way around this? Were you able to solve this problem?