Game ideas & features

Your next feature

Groups

Guilds, clans and teams with roles for the selected project.

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

After timeout or conflict, retain the original intent and read current state. Never automatically retry using a new revision.

Video coming later

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

Groups

Prepare the same project

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

    Groups →
  2. No additional definition is needed for the first request. An empty result is valid until matching game data exists.

    Groups are created and managed in the game.

    This first example reads data. It creates no group, match or object. An empty list is a valid first response.

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 ReadMyGroups() from an explicit button or scene action. Opening the file alone sends no request.

C#
Assets/Scripts/GroupsDemo.cs
horizOn call
1using UnityEngine;
2using PM.horizOn.Cloud.Manager;
3​
4public sealed class GroupsDemo : MonoBehaviour
5{
6 // Initialize/connect once and restore the existing player in the Quickstart first.
7 // Invoke from a player action; no background refresh or membership mutation.
8 public async void ReadMyGroups()
9 {
10 var user = UserManager.Instance.CurrentUser;
11 if (user == null || !user.IsValid()) return;
12 var result = await GroupsManager.Instance.GetGroups(user.UserId);
13 if (!result.IsSuccess) { Debug.LogWarning(result.ErrorCode); return; }
14 Debug.Log($"Player revision: {result.Data.revision}");
15 foreach (var group in result.Data.groups)
16 Debug.Log($"Group {group.id}: {group.myRole}, revision {group.revision}");
17 // result.Data.limits contains all current limits; existing groups may exceed them.
18 // GetMembers(userId, groupId, afterUserId: null, limit: 1) reads one page.
19 // Keep its revision and nextAfterUserId. A changed revision requires a restart.
20 // Pending createdAt may be absent/null; it does not mean the Unix epoch.
21 }
22}
23// For writes use the SDK GroupsExample and its durable GroupsSampleStore.
24// Preserve the exact project/player, body, expected revision and pending requestId.
25// Unknown create: read/reconcile explicitly; never create with a replacement revision.
Open the complete SDK sample ↗

Test your new feature.

After timeout or conflict, retain the original intent and read current state. Never automatically retry using a new revision.

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

Endpoints
  • GET/groups
  • GET/groups/{groupId}
  • GET/groups/{groupId}/members
  • GET/groups/{groupId}/pending
  • POST/groups
  • PUT/groups/{groupId}
  • POST/groups/{groupId}/join
  • POST/groups/{groupId}/request
  • POST/groups/{groupId}/invite
  • POST/groups/{groupId}/accept-invite
  • POST/groups/{groupId}/decline-invite
  • POST/groups/{groupId}/cancel-invite
  • POST/groups/{groupId}/accept-request
  • POST/groups/{groupId}/decline-request
  • POST/groups/{groupId}/cancel-request
  • POST/groups/{groupId}/leave
  • POST/groups/{groupId}/remove
  • POST/groups/{groupId}/role
  • POST/groups/{groupId}/transfer
  • POST/groups/{groupId}/delete
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.