# Hosted Playground

这个 sample 用来替代旧 Arena 包里的单体 `BasicExample` 场景。

目标：

- 给开发者一个带 UI 绑定点和日志入口的综合 sample
- 覆盖 room lifecycle、realtime、state、RPC 和 data plane
- 保持脚本级 sample，而不是在仓库里长期维护一个脆弱的预制 Scene 资产

## 包含内容

- `IGPHostedPlaygroundController.cs`
  一个 UGUI 驱动的综合示例控制器
- `IGPKcpConnectionExample.cs`
  一个专门观察 hosted data plane / RTT 的轻量脚本

## 推荐接法

1. 导入本地包 sample
2. 场景里放一个 `IGPRuntimeManager`
3. 可选再放一个 `IGPEventManager`
4. 新建一个带 UGUI 的 Canvas
5. 把 InputField / Text / ScrollRect 绑到 `IGPHostedPlaygroundController`
6. 把常用按钮分别绑定到：
   - `RefreshRoom`
   - `SetReady`
   - `StartGame`
   - `FinishGame`
   - `LeaveRoom`
   - `SendKcpBroadcast`
   - `SetGlobalState`
   - `GetState`
   - `ResetState`
   - `RegisterRpc`
   - `CallRpc`

如果你只需要最短接入验证，不要从这个 sample 开始，先看：

- `StarterDemo`
- `RoomLifecycle`
- `RealtimeMessaging`
