跳轉到主要內容
取得與此本機使用者相關聯的 PlayFab 實體識別碼。

語法

參數

entityId   PartyString*
library-allocated output
使用者的輸出實體識別碼。

傳回值

PartyError c_partyErrorSuccess (如果呼叫成功),否則為錯誤碼。可透過 PartyManager::GetErrorMessage() 擷取錯誤碼的人類可讀形式。

備註

擷取的 PlayFab 實體識別碼與遊戲透過 PartyManager::CreateLocalUser() 或 PartyManager::CreateLocalUserWithEntityType() 提供的實體識別碼相同。這也與代表該實體之 PFEntityKey 結構的 id 欄位中的值相同。GetEntityType() 傳回的值則代表 PFEntityKey 的另一半。

實體識別碼字串的記憶體在本機使用者的存留期間內保持有效,也就是直到 PartyManager::StartProcessingStateChanges() 提供其 PartyDestroyLocalUserCompletedStateChange,且所有參考該本機使用者的狀態變更都已傳回給 PartyManager::FinishProcessingStateChanges() 為止。

需求

標頭: Party.h

另請參閱

PartyLocalUser
PartyLocalUser::GetEntityType
PartyManager::CreateLocalUser
PartyManager::CreateLocalUserWithEntityType
最後修改於 2026年10月8日