Forum Discussion
FieldOfVision
8 years agoHeroic Explorer
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!
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
- juanoldinhoHeroic ExplorerCan 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/ - FieldOfVisionHeroic Explorer@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. - FieldOfVisionHeroic ExplorerThere 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. - FieldOfVisionHeroic ExplorerI 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.
- FieldOfVisionHeroic ExplorerI'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?
- rajeev_mukundanHonored Guest@FieldOfVision
Did you find a way around this? Were you able to solve this problem?
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
- 2 years ago
- 10 months ago
- 5 months ago
- 4 years agoAnonymous