You've already forked CC-Framework.BriskGameServer
Initial Brisk Unity SDK project
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Quick Start
|
||||
|
||||
## Initialize
|
||||
|
||||
```csharp
|
||||
await Brisk.InitializeAsync(new BriskOptions
|
||||
{
|
||||
BaseUrl = "https://brisk.lightyears.ltd",
|
||||
GameKey = "demo-game",
|
||||
ClientVersion = Application.version,
|
||||
DeviceId = SystemInfo.deviceUniqueIdentifier
|
||||
});
|
||||
```
|
||||
|
||||
## Login
|
||||
|
||||
```csharp
|
||||
await Brisk.Auth.LoginWithUserIdAsync("tap", "tap_user_10001");
|
||||
```
|
||||
|
||||
## Common calls
|
||||
|
||||
```csharp
|
||||
var me = await Brisk.Player.GetMeAsync();
|
||||
var config = await Brisk.Config.GetCurrentAsync();
|
||||
var top = await Brisk.Leaderboard.GetTopAsync("season-score", 20);
|
||||
await Brisk.Leaderboard.SubmitScoreAsync("season-score", 128);
|
||||
```
|
||||
|
||||
## Sample
|
||||
|
||||
For the current source project, open directly:
|
||||
|
||||
- `Assets/BriskSdk/Samples/QuickStart/BriskQuickStartSample.cs`
|
||||
- `Assets/Scenes/BriskQuickStartScene.unity`
|
||||
|
||||
The sample scene uses an IMGUI debug panel and can directly test:
|
||||
|
||||
- initialize and restore
|
||||
- login by `login_user_id`
|
||||
- login by `code`
|
||||
- player, config, announcement, leaderboard, archive, and space flows
|
||||
- global event logs and request results
|
||||
Reference in New Issue
Block a user