11# asobi-unity
22
3- Unity client SDK for the [ Asobi] ( https://asobi.dev ) game backend. Unity 2021.3+, pure C# .
3+ Unity client SDK for the [ Asobi] ( https://github.com/widgrensit/asobi ) game backend. Requires Unity 2021.3+.
44
55## Installation
66
@@ -10,7 +10,7 @@ Add via Unity Package Manager using the git URL:
1010https://github.com/widgrensit/asobi-unity.git
1111```
1212
13- Window > Package Manager > + > Add package from git URL...
13+ Window > Package Manager > + > Add package from git URL.
1414
1515## Quick Start
1616
@@ -19,60 +19,38 @@ using Asobi;
1919
2020var client = new AsobiClient (" localhost" , port : 8080 );
2121
22- // Auth
23- await client .Auth .Register (" player1" , " secret123" );
24- await client .Auth .Login (" player1" , " secret123" );
22+ // Register & login
23+ await client .Auth .RegisterAsync (" player1" , " secret123" , " Player One " );
24+ await client .Auth .LoginAsync (" player1" , " secret123" );
2525
2626// REST APIs
27- var player = await client .Players .GetSelf ();
28- var top = await client .Leaderboards .GetTop (" weekly" );
29- var wallets = await client .Economy .GetWallets ();
27+ var player = await client .Players .GetSelfAsync ();
28+ var top = await client .Leaderboards .GetTopAsync (" weekly" );
29+ var wallets = await client .Economy .GetWalletsAsync ();
30+
31+ // Matchmaking
32+ var ticket = await client .Matchmaker .AddAsync (" arena" );
3033
3134// Real-time
32- client .Realtime .OnMatchState += (state ) => Debug .Log ($" Tick: {state [" tick" ]}" );
33- await client .Realtime .ConnectAsync ();
34- await client .Realtime .AddToMatchmaker (" arena" );
35+ client .Realtime .OnMatchState += state => Debug .Log ($" Tick: {state .tick }" );
36+ client .Realtime .Connect ();
3537```
3638
3739## Features
3840
39- - ** Auth** - Register, login, token refresh
40- - ** Players** - Profiles, updates
41- - ** Matchmaker** - Queue, status, cancel
42- - ** Matches** - List, details
43- - ** Leaderboards** - Top scores, around player, submit
44- - ** Economy** - Wallets, store, purchases
45- - ** Inventory** - Items, consume
46- - ** Social** - Friends, groups, chat history
47- - ** Tournaments** - List, join
48- - ** Notifications** - List, read, delete
49- - ** Storage** - Cloud saves, key-value
50- - ** IAP** - In-app purchase receipt validation
51- - ** Realtime** - WebSocket for matches, chat, presence, matchmaking
52-
53- ## API Reference
54-
55- All API modules are accessible from ` AsobiClient ` :
56-
57- | Property | Class |
58- | ----------| -------|
59- | ` Auth ` | ` AsobiAuth ` |
60- | ` Players ` | ` AsobiPlayers ` |
61- | ` Matchmaker ` | ` AsobiMatchmaker ` |
62- | ` Matches ` | ` AsobiMatches ` |
63- | ` Leaderboards ` | ` AsobiLeaderboards ` |
64- | ` Economy ` | ` AsobiEconomy ` |
65- | ` Inventory ` | ` AsobiInventory ` |
66- | ` Social ` | ` AsobiSocial ` |
67- | ` Tournaments ` | ` AsobiTournaments ` |
68- | ` Notifications ` | ` AsobiNotifications ` |
69- | ` Storage ` | ` AsobiStorage ` |
70- | ` IAP ` | ` AsobiIAP ` |
71- | ` Realtime ` | ` AsobiRealtime ` |
72-
73- ## Demo
74-
75- See [ asobi-unity-demo] ( https://github.com/widgrensit/asobi-unity-demo ) for a complete example project.
41+ - ** Auth** — Register, login, OAuth, provider linking, token refresh
42+ - ** Players** — Profiles, updates
43+ - ** Matchmaker** — Queue, status, cancel
44+ - ** Matches** — List, details
45+ - ** Leaderboards** — Top scores, around player, submit
46+ - ** Economy** — Wallets, store, purchases
47+ - ** Inventory** — Items, consume
48+ - ** Social** — Friends, groups, chat history
49+ - ** Tournaments** — List, join
50+ - ** Notifications** — List, read, delete
51+ - ** Storage** — Cloud saves, key-value
52+ - ** IAP** — In-app purchase receipt validation
53+ - ** Realtime** — WebSocket with events for matches, chat, presence, matchmaking
7654
7755## License
7856
0 commit comments