1 Commits

Author SHA1 Message Date
7a8dd4cea0 Release v0.3.0 lowercase UPM package name 2026-04-11 14:44:13 +08:00
142 changed files with 149 additions and 78 deletions

View File

@@ -1,68 +0,0 @@
# FoldCC Brisk Game Server SDK
This directory is the package publishing skeleton for Brisk.
The active Unity project source currently lives under:
- `Assets/BriskSdk/Runtime`
- `Assets/BriskSdk/Samples/QuickStart`
- `Assets/Scenes/BriskQuickStartScene.unity`
Sync package content from the Unity source project with:
- `Tools/Sync-BriskPackage.ps1`
## Included runtime modules
- Bootstrap and initialization
- Auth and session restore
- Player profile
- Dynamic config
- Announcements
- Leaderboard
- Archive upload and download
- Player space
- Default blocking error UI
## Archive checksum
Archive upload checksum is handled by the SDK by default.
- For quick use, the archive module now provides:
- `UploadAsync(slotNo, bytes)` for binary
- `UploadTextAsync(slotNo, text)` for UTF-8 text
- `UploadJsonAsync(slotNo, payload)` for JSON objects
- `DownloadAsync(slotNo)` for raw bytes + metadata
- `DownloadTextAsync(slotNo)` for UTF-8 text
- `DownloadJsonAsync(slotNo)` for JSON payloads
- The SDK computes SHA256 automatically when uploading archive bytes
- The current Brisk archive API expects a plain lowercase SHA256 hex string
- Do not send values with a `sha256:` prefix
- If a manual checksum includes that prefix, the SDK will normalize it before sending
## Space content
Player space now follows a metadata + binary content model.
- `GetByPlayerIdAsync(...)` and `GetByLoginIdentityAsync(...)` return metadata only
- `DownloadContentByPlayerIdAsync(...)` and `DownloadContentByLoginIdentityAsync(...)` return raw bytes
- `UpdateMyAsync(string)` uploads text content directly
- `UpdateMyAsync(byte[])` uploads binary content directly
- `UpdateMyAsync(object)` serializes the object as JSON automatically
## Package layout
- `Runtime`
- `Samples~`
- `Documentation~`
## Quick start
See:
- `Documentation~/QuickStart.md`
- `Samples~/QuickStart`
This sample uses an IMGUI test panel for end-to-end SDK flow verification.
When preparing a publish branch, place the package-ready runtime, samples, and docs into this package directory and tag that branch for external consumption.

View File

@@ -1,5 +1,11 @@
# Changelog
## 0.3.0
- Renamed the UPM package identifier to `com.foldcc.cc-framework.brisk-game-server`
- Renamed the publish directory to the all-lowercase package path
- Updated sync tooling and integration documentation for Git-based package import
## 0.2.0
- Refined archive APIs with direct text and JSON upload/download helpers

View File

@@ -0,0 +1,102 @@
# FoldCC Brisk Game Server SDK
Brisk Unity SDK 的 UPM 发布目录。
当前仓库地址:
- `http://private.lightyears.ltd:18650/foldcc/CC-Framework.BriskGameServer`
当前包名:
- `com.foldcc.cc-framework.brisk-game-server`
## 如何引入到项目
推荐通过 Unity Package Manager 的 Git URL 方式引入。
### 方式一Package Manager
1. 打开 `Window > Package Manager`
2. 点击左上角 `+`
3. 选择 `Add package from git URL...`
4. 输入:
```text
http://private.lightyears.ltd:18650/foldcc/CC-Framework.BriskGameServer.git?path=/PackageSource/com.foldcc.cc-framework.brisk-game-server#v0.3.0
```
### 方式二:修改 `Packages/manifest.json`
```json
{
"dependencies": {
"com.foldcc.cc-framework.brisk-game-server": "http://private.lightyears.ltd:18650/foldcc/CC-Framework.BriskGameServer.git?path=/PackageSource/com.foldcc.cc-framework.brisk-game-server#v0.3.0"
}
}
```
如果需要跟随主分支最新代码,可将末尾的 `#v0.3.0` 改成 `#main`;正式环境建议固定到发布 tag。
## 开发态源码位置
开发工程中的活代码位于:
- `Assets/BriskSdk/Runtime`
- `Assets/BriskSdk/Samples/QuickStart`
- `Assets/Scenes/BriskQuickStartScene.unity`
同步 package 内容时执行:
```powershell
./Tools/Sync-BriskPackage.ps1
```
## 已包含模块
- Bootstrap 与初始化
- Auth 与会话恢复
- 玩家信息
- 动态配置
- 公告
- 排行榜
- 云存档上传下载
- 玩家空间
- 默认阻断式错误 UI
## Archive checksum
云存档上传时SDK 默认自动处理 checksum。
- `UploadAsync(slotNo, bytes)` 用于二进制
- `UploadTextAsync(slotNo, text)` 用于 UTF-8 文本
- `UploadJsonAsync(slotNo, payload)` 用于 JSON 对象
- `DownloadAsync(slotNo)` 返回原始 bytes 和元信息
- `DownloadTextAsync(slotNo)` 返回 UTF-8 文本
- `DownloadJsonAsync(slotNo)` 返回 JSON 结果
- SDK 会自动计算 SHA256
- 当前 Brisk archive API 要求纯小写 SHA256 十六进制字符串
- 不要传 `sha256:` 前缀
- 若手动传入带前缀的 checksumSDK 会自动归一化
## Space content
玩家空间当前采用 metadata + binary content 模型。
- `GetByPlayerIdAsync(...)``GetByLoginIdentityAsync(...)` 返回元数据
- `DownloadContentByPlayerIdAsync(...)``DownloadContentByLoginIdentityAsync(...)` 返回原始 bytes
- `UpdateMyAsync(string)` 直接上传文本
- `UpdateMyAsync(byte[])` 直接上传二进制
- `UpdateMyAsync(object)` 自动序列化为 JSON
## 目录结构
- `Runtime`
- `Samples~`
- `Documentation~`
## 快速开始
查看:
- `Documentation~/QuickStart.md`
- `Samples~/QuickStart`

Some files were not shown because too many files have changed in this diff Show More