> ## 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.

# XGameUiShowPlayerPickerAsync

> XGameUiShowPlayerPickerAsync

# XGameUiShowPlayerPickerAsync

ゲームをプレイしている人物が、提示された人物のリストからプレイヤーを選択できるピッカー UI を表示します。

## 構文

```cpp theme={null}
HRESULT XGameUiShowPlayerPickerAsync(  
         XAsyncBlock* async,  
         XUserHandle requestingUser,  
         const char* promptText,  
         uint32_t selectFromPlayersCount,  
         const uint64_t* selectFromPlayers,  
         uint32_t preSelectedPlayersCount,  
         const uint64_t* preSelectedPlayers,  
         uint32_t minSelectionCount,  
         uint32_t maxSelectionCount  
)  
```

### パラメーター

*async*   \_In\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)

[XAsyncRun](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasyncrun.md) に渡される [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md) へのポインター。

*requestingUser*   \_In\_\
Type: XUserHandle

プレイヤー ピッカー UI を要求しているユーザーへのハンドル。

*promptText*   \_In\_z\_\
Type: char\*

プロンプトの表示テキスト。

*selectFromPlayersCount*   \_In\_\
Type: uint32\_t

呼び出し元が選択できるプレイヤーの数。

*selectFromPlayers*   \_In\_reads\_(selectFromPlayersCount)\
Type: uint64\_t\*

呼び出し元が選択できるプレイヤー ID のリストへのポインター。

*preSelectedPlayersCount*   \_In\_\
Type: uint32\_t

UI が表示されたときにあらかじめ選択されているプレイヤーの数。

*preSelectedPlayers*   \_In\_reads\_opt\_(preSelectedPlayersCount)\
Type: uint64\_t\*

UI が表示されたときにあらかじめ選択されているプレイヤー ID のリストへのポインター。

*minSelectionCount*   \_In\_\
Type: uint32\_t

呼び出し元が選択する必要のある最小人数。

*maxSelectionCount*   \_In\_\
Type: uint32\_t

呼び出し元が選択できる最大人数。

### 戻り値

Type: HRESULT

非同期呼び出しの HRESULT 成功またはエラー コード。

結果を取得するには、*AsyncBlock* コールバック内または *AsyncBlock* の完了後に [XGameUiShowPlayerPickerResultCount](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresultcount.md) および [XGameUiShowPlayerPickerResult](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md) を呼び出します。

## 解説

プレイヤー ID は XBOX ユーザー ID (XUID) である必要があり、これは *uint64\_t* 値です。

UI を呼び出すと、ゲームは *制約付きモード* に入ります。制約付きモードでは、呼び出された UI のバックグラウンドにある間、タイトルが受け取るシステム リソースが少なくなります。制約付きモードやタイトルのその他の運用モードの詳細については、「[XBOX ゲーム ライフ サイクル (NDA トピック)](https://docs.xbox.com/ja-jp/build/console-features/console-workflows/xbox-game-life-cycle.md)」を参照してください。

## 要件

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

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、Steam Deck、XBOX One ファミリー本体および XBOX Series 本体

## 関連項目

[XGameUI](https://docs.xbox.com/ja-jp/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowPlayerPickerResult](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)\
[XGameUiShowPlayerPickerResultCount](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresultcount.md)\
[XBOX ゲーム ライフ サイクル (NDA トピック)](https://docs.xbox.com/ja-jp/build/console-features/console-workflows/xbox-game-life-cycle.md)


## Related topics

- [XGameUiShowPlayerPickerResult](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresult.md)
- [XGameUiShowPlayerPickerUiCallback](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickeruicallback.md)
- [XGameUiShowPlayerPickerResultCount](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuishowplayerpickerresultcount.md)
- [XGameUiSetPlayerPickerUiResponse](https://docs.xbox.com/ja-jp/reference/system/xgameui/functions/xgameuisetplayerpickeruiresponse.md)
- [XGameUiUiCallbacks](https://docs.xbox.com/ja-jp/reference/system/xgameui/structs/xgameuiuicallbacks.md)
