上下文

目标读者:需要附带游戏状态来帮助定位反馈的开发者。

上下文应说明玩家在哪里、刚刚做了什么。合同支持 scenelevelpositionquest_idextra 对象。breadcrumbs 和最近日志是单独数组,数量限制来自 SDK config。

最小示例

EchoNebulaFeedback.set_player({
  "player_id_hash": "sha256:337180dda29405211bf7a37ea531367110370dc54db2298fcf4450f1749badb3"
})

EchoNebulaFeedback.set_context({
  "scene": "res://scenes/hub.tscn",
  "level": "hub",
  "position": { "x": 12.5, "y": 0.0, "z": -3.0 },
  "quest_id": "tutorial_find_gate"
})

EchoNebulaFeedback.set_context_provider(func() -> Dictionary:
  return { "extra": { "coins": 42, "party_size": 3 } }
)

EchoNebulaFeedback.add_breadcrumb("inventory.opened", { "tab": "weapons" })
EchoNebulaFeedback.log_warning("Network retry started")

常见错误

下一步

阅读 截图与隐私