Game ideas & features

Your next feature

Achievements

Each key unlocks once per player. Manual rules trust the game; statistic thresholds evaluate in the same affected report.

SDK developRequires a player session
Unity
Illustration of Achievements
Your visible result

After the action, first_steps is unlocked for the same player. Repeating its key grants no second unlock or reward.

Video coming later

This step does not have a video yet. The guide and MCP request are ready to use.

Achievements

Prepare the same project

  1. Choose the same project in the dashboard as in your game configuration.

    Achievements →
  2. Create or reuse these test entries in the dashboard form. These are example values, not current project data.

    Key
    first_steps
    Name
    First steps
    Unlock rule
    manual
    Active
    true
    Hidden until unlocked
    false
    No reward
    []

    Each key unlocks once per player. Manual rules trust the game; statistic thresholds evaluate in the same affected report.

  3. Save, reload and verify the entries before running the example. Preserve unrelated definitions.

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed, project configuration imported and player signed in.

This SDK example uses develop. Check whether the required APIs exist in your installed SDK.

Complete the Quickstart connection with the intended player. Call RunReviewedAction() from an explicit button or scene action. Opening the file alone sends no request.

C#
Assets/Scripts/AchievementsDemo.cs
horizOn call
1using System.Linq;
2using UnityEngine;
3using PM.horizOn.Cloud.Core;
4using PM.horizOn.Cloud.Manager;
5​
6// Existing SDK/project configuration and authenticated player session required.
7// Call RunReviewedAction explicitly after reviewing this example and its data.
8// Rewards are credited immediately with the unlock. If credit fails, the
9// entire action is rolled back.
10// This explicit action unlocks the shown configured achievement key.
11public sealed class AchievementsDemo : MonoBehaviour
12{
13 public async void RunReviewedAction()
14 {
15 var sessionUser = UserManager.Instance.CurrentUser;
16 if (sessionUser == null || !sessionUser.IsValid()) return;
17 var userId = UserManager.Instance.CurrentUser.UserId;
18 var manager = AchievementsManager.Instance;
19 var loaded = await manager.GetAchievements(userId);
20 if (!loaded.IsSuccess) { Debug.LogWarning(loaded.ErrorCode); return; }
21 foreach (var progress in loaded.Data.progress)
22 Debug.Log(progress.key + ": " + progress.rewardState);
23​
24 // Configure a manual first_steps definition, then call this on the matching game action.
25 var unlocked = await manager.Unlock(userId, "first_steps");
26 if (!unlocked.IsSuccess) { Debug.LogWarning(unlocked.ErrorCode); return; }
27 // Repeat the same key after timeout; never create a replacement reward identity.
28 // rewardState is complete, unlockedAt is null, and deliveryResults is empty.
29 // Values were credited atomically. Read PlayerValues again when showing the balance.
30 // No Inbox claim or local value addition. Refresh achievements after statistics updates.
31 }
32}
Open the complete SDK sample ↗

Test your new feature.

After the action, first_steps is unlocked for the same player. Repeating its key grants no second unlock or reward.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • GET/achievements
  • POST/achievements/unlock
  • POST/achievements/rewards/deliver
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.