Oyun fikirleri ve özellikleri

Sıradaki özelliğin

Gruplar

Seçilen proje için rollere sahip loncalar, klanlar ve takımlar.

SDK: developOyuncu oturumu gerekli
Unity
Gruplar görseli
Görünür sonuç

Zaman aşımı veya çakışmadan sonra asıl işlemi koruyun ve durumu okuyun. Yeni revizyonla otomatik yinelemeyin.

Video yakında

Bu adımın videosu henüz yok. Rehber ve MCP isteği kullanıma hazır.

Gruplar

Aynı projeyi hazırlayın

  1. Panelde oyun yapılandırmandaki projeyle aynı projeyi seç.

    Gruplar →
  2. İlk istek için ek tanım gerekmez. Eşleşen oyun verisi yokken boş sonuç geçerlidir.

    Gruplar oyun içinde oluşturulur ve yönetilir.

    İlk örnek veri okur. Grup, maç veya nesne oluşturmaz. Boş liste geçerli bir ilk yanıttır.

Bu özelliği ekle

Kılavuzu inceleyebilirsin. Çalıştırmak için etkin bir proje anahtarı gerekir. Projeyi hazırla

SDK kurulu, proje yapılandırması içe aktarılmış ve oyuncu oturum açmış olmalı.

Bu SDK örneği develop kullanır. Gerekli API'lerin kurulu SDK sürümünde bulunduğunu kontrol et.

Hızlı başlangıç bağlantısını ilgili oyuncuyla tamamlayın. ReadMyGroups() çağrısını açık bir düğme veya sahne eyleminden yapın. Dosyayı açmak tek başına istek göndermez.

C#
Assets/Scripts/GroupsDemo.cs
horizOn çağrısı
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.
Tam SDK örneğini aç ↗

Yeni özelliğini test et.

Zaman aşımı veya çakışmadan sonra asıl işlemi koruyun ve durumu okuyun. Yeni revizyonla otomatik yinelemeyin.

Panelde oyun yapılandırmandaki projeyle aynı projeyi seç.

Uç noktalar
  • 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
API referansındaki tüm uç noktalar
Sıradaki adım için önerimiz

Her tura bir yüksek puan ekle.

Turdan sonra puanı kaydet ve kimin önde olduğunu göster. Bağlantını ve oyuncu oturumunu kullanmaya devam et.