> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFEntityKey - PlayFab 多人游戏 SDK

> PlayFab 多人游戏 C++ SDK 中的 PFEntityKey：一个组合实体类型和 ID 的结构体，用于在大厅和匹配 API 中唯一标识单个实体。

PFEntityKey 数据模型。组合的实体类型和 ID 结构，唯一标识单个实体。

## 语法

```cpp theme={null}
typedef struct PFEntityKey {  
    const char* id;  
    const char* type;  
} PFEntityKey;  
```

### 成员

**`id`**   const char\*\
**Null\_terminated**

实体的唯一 ID。

**`type`**   const char\*\
**Null\_terminated**

实体类型。请参阅 /playfab/live-service-management/game-configuration/entities/available-built-in-entity-types。

玩家实体通常是 `title_player_account` 类型。有关详细信息，请参阅 /playfab/live-service-management/game-configuration/entities/available-built-in-entity-types。

## 备注

有关实体的详细信息，请参阅 /playfab/live-service-management/game-configuration/entities/。

## 要求

**头文件：** PFEntityKey.h


## Related topics

- [PlayFab 多人游戏 C++ SDK 错误代码](/zh-CN/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayererrors.md)
- [使用 PlayFab 的多人游戏](/zh-CN/services/playfab/multiplayer/mpintro.md)
- [使用 PlayFab Multiplayer Servers 托管多人游戏](/zh-CN/services/playfab/multiplayer/servers/using-playfab-servers-to-host-games.md)
- [启用 PlayFab 多人游戏服务器功能](/zh-CN/services/playfab/multiplayer/servers/enable-playfab-multiplayer-servers.md)
- [部署 PlayFab 多人游戏服务器构建](/zh-CN/services/playfab/multiplayer/servers/deploying-playfab-multiplayer-server-builds.md)
