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

# 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\_<br />Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

[XAsyncRun](/reference/system/xasync/functions/xasyncrun) に渡される [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) へのポインター。

*requestingUser*   \_In\_<br />Type: XUserHandle

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

*promptText*   \_In\_z\_<br />Type: char\*

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

*selectFromPlayersCount*   \_In\_<br />Type: uint32\_t

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

*selectFromPlayers*   \_In\_reads\_(selectFromPlayersCount)<br />Type: uint64\_t\*

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

*preSelectedPlayersCount*   \_In\_<br />Type: uint32\_t

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

*preSelectedPlayers*   \_In\_reads\_opt\_(preSelectedPlayersCount)<br />Type: uint64\_t\*

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

*minSelectionCount*   \_In\_<br />Type: uint32\_t

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

*maxSelectionCount*   \_In\_<br />Type: uint32\_t

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

### 戻り値

Type: HRESULT

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

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

## 解説

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

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

## 要件

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

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

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

## 関連項目

[XGameUI](/reference/system/xgameui/xgameui_members)<br />[XGameUiShowPlayerPickerResult](/reference/system/xgameui/functions/xgameuishowplayerpickerresult)<br />[XGameUiShowPlayerPickerResultCount](/reference/system/xgameui/functions/xgameuishowplayerpickerresultcount)<br />[XBOX ゲーム ライフ サイクル (NDA トピック)](/build/console-features/console-workflows/xbox-game-life-cycle)


## Related topics

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