跳轉到主要內容
管理整個遊戲範圍的索引鍵/值資料。命令會以用戶端可讀取的遊戲資料 (玩家的遊戲用戶端所讀取的資料) 為目標,除非您加入 --internal,以僅限伺服器的內部遊戲資料為目標。您需要具備遊戲的 Admin 權限;請參閱 PlayFab 驗證的運作方式。 title-data 命令不接受 --output table。

playfab title-data get

省略索引鍵和 --keys 即可讀取每個索引鍵。 針對一個索引鍵的 get 會列印該索引鍵的單純值。若要改為取得 JSON,請傳遞 --output 以取得完整信封,或傳遞 --data-only 以取得其 data。讀取數個索引鍵或每個索引鍵時,一律會傳回 JSON。
當該索引鍵不存在時,get 會將 Key 'MyKey' was not found. 寫入 stderr,並以代碼 1 結束。

playfab title-data set

設定一個索引鍵:
或一次設定數個索引鍵:
成功時,set 會寫入它所設定的索引鍵,例如 {"applied":["MyKey","OtherKey"]}。

playfab title-data delete

成功時,delete 會寫入它所移除的索引鍵,例如 {"applied":["MyKey","OldKey"]}。

多索引鍵寫入中途停止時

set 和 delete 會依序一次寫入一個索引鍵,並在第一個未成功的索引鍵處停止。在其之前的索引鍵已寫入;在其之後的索引鍵則未嘗試。命令會以代碼 1 結束,並將摘要寫入 stderr:
最後修改於 2026年11月19日