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

# PartyLocalUser::GetEntityId

> このローカル ユーザーに関連付けられた PlayFab エンティティ ID を取得します。

このローカル ユーザーに関連付けられた PlayFab エンティティ ID を取得します。

## 構文

```cpp theme={null}
PartyError GetEntityId(  
    PartyString* entityId  
)  
```

### パラメーター

**`entityId`**   [PartyString\*](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/typedefs.md)\
*ライブラリによって割り当てられる出力*

ユーザーの出力エンティティ ID。

### 戻り値

PartyError

呼び出しが成功した場合は `c_partyErrorSuccess`、それ以外の場合はエラー コード。エラー コードの人間が判読可能な形式は、[PartyManager::GetErrorMessage()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md) から取得できます。

## 解説

取得される PlayFab エンティティ ID は、[PartyManager::CreateLocalUser()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluser.md) または [PartyManager::CreateLocalUserWithEntityType()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluserwithentitytype.md) を介してタイトルによって提供されたエンティティ ID と同じです。この値は、エンティティを表す `PFEntityKey` 構造体の *id* フィールドで見つかる値と同じでもあります。[GetEntityType()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getentitytype.md) から返される値は、`PFEntityKey` のもう一方の半分を表します。\
\
&#x20;エンティティ ID 文字列のメモリは、ローカル ユーザーの有効期間中、つまり [PartyDestroyLocalUserCompletedStateChange](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/structs/partydestroylocalusercompletedstatechange.md) が [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md) を介して提供され、ローカル ユーザーを参照するすべての状態変化が [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md) に返されるまで有効です。

## 要件

**ヘッダー:** Party.h

## 関連項目

[PartyLocalUser](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser.md)\
[PartyLocalUser::GetEntityType](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getentitytype.md)\
[PartyManager::CreateLocalUser](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluser.md)\
[PartyManager::CreateLocalUserWithEntityType](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluserwithentitytype.md)


## Related topics

- [PartyLocalUser::GetEntityType](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getentitytype.md)
- [PartyLocalUser::UpdateEntityToken](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_updateentitytoken.md)
- [PartyEndpoint::GetEntityId](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getentityid.md)
- [PartyChatControl::GetEntityId](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentityid.md)
- [PartyLocalUser::GetCustomContext](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/methods/partylocaluser_getcustomcontext.md)
