Skip to main content
获取与此终结点关联的用户的 PlayFab Entity ID。

Syntax

Parameters

entityId   PartyString*
library-allocated output, may return nullptr
与此终结点关联的用户的输出 Entity ID,或 nullptr。

Return value

PartyError 如果调用成功,则返回 c_partyErrorSuccess;否则返回错误代码。可通过 PartyManager::GetErrorMessage() 检索错误代码的可读形式。

Remarks

返回的字符串与表示该实体的 PFEntityKey 结构中的 ID 字段中找到的值相同。GetEntityType() 返回的值将表示 PFEntityKey 的另一半。

如果此终结点未与用户关联,entityId 将被设置为 nullptr。

Entity ID 字符串的内存在终结点的生命周期内保持有效,即在其 PartyEndpointDestroyedStateChange 和/或 PartyDestroyEndpointCompletedStateChange(取决于所发生的销毁类型)已通过 PartyManager::StartProcessingStateChanges() 提供并且所有引用该终结点的状态更改已返回到 PartyManager::FinishProcessingStateChanges() 之前。

Requirements

Header: Party.h

See also

PartyEndpoint
PartyEndpoint::GetEntityType
最后修改于 2026年8月13日