cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger achievements from Unity3D

msgames
Level 2
Hi all,

Been looking through the documentation and the Oculus Utilities package for Unity, trying to figure out how you access / unlock achievements, but can't seem to find anything at all.

What scripts should I be looking in (and / or what documentation have I blatantly missed)?

Appreciate any insight,
Thank you.

Matt
1 REPLY 1

nerbert
Level 2
The OVRPlatformSDK (1.8.0) has examples that you can use as a base to work from.
/Samples/UnitySample/PlatformSample/Assets/DataEntry.cs
Core.Initialize("....");
Achievements.AddFields(achievementName, fields).OnComplete(achievementFieldsCallback);
Achievements.AddCount(achievementName, Convert.ToUInt64(count)).OnComplete(achievementCountCallback);
Achievements.Unlock(achievementName).OnComplete(achievementUnlockCallback);