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

# XGameRuntimeIsFeatureAvailable

> XGameRuntimeIsFeatureAvailable

# XGameRuntimeIsFeatureAvailable

Indica si una característica del entorno de ejecución de juegos (Gaming Runtime) está disponible.

## Sintaxis

```cpp theme={null}
bool XGameRuntimeIsFeatureAvailable(  
         XGameRuntimeFeature feature  
)  
```

### Parámetros

*feature*   \
Tipo: [XGameRuntimeFeature](/reference/system/xgameruntimefeature/enums/xgameruntimefeature)

La característica de Gaming Runtime que se va a consultar.

### Valor devuelto

Tipo: bool

Devuelve **true** si la característica de Gaming Runtime está disponible; de lo contrario, **false**.

## Comentarios

Después de inicializar Gaming Runtime con [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize), use esta función para comprobar si hay características específicas de Gaming Runtime disponibles para su juego.

En el ejemplo siguiente se usa la función **XGameRuntimeIsFeatureAvailable** para comprobar si las características Async, AsyncProvider y TaskQueue están disponibles. Las tres características son necesarias para usar colas de tareas para ejecutar tareas asincrónicas.

```cpp theme={null}
// Confirm that all of the features needed to run asynchronous tasks on 
// task queues are available.
bool Game::CheckAsyncTaskQueueFeatures()
{
    
    return (XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XTaskQueue) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsyncProvider) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsync));

}
```

## Requisitos

**Encabezado:** XGameRuntimeFeature.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Documentación conceptual

* [Introducción a Game Chat 2](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)

## Consulte también

[Glosario de Gaming Runtime](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/gaming-runtime-glossary)\
[Clase XGameRuntimeFeature](/reference/system/xgameruntimefeature/xgameruntimefeature_members)\
[Enumeración XGameRuntimeFeature](/reference/system/xgameruntimefeature/enums/xgameruntimefeature)


## Related topics

- [XGameRuntimeFeature](/es/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)
- [XGameRuntimeFeature (contenido de la API)](/es/reference/system/xgameruntimefeature/xgameruntimefeature_members.md)
- [Introducción a Windows Sockets en el GDK](/es/build/console-features/networking/game-mesh/winsock-intro-networking.md)
- [Contenedores de API de C# de Unity para el GDK](/es/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XSystemRuntimeInfo](/es/reference/system/xsystem/structs/xsystemruntimeinfo.md)
