# GetDevicesWithRole(InputDeviceRole, List<InputDevice>)

> Gets a list of active input devices available to the XR Input Subsystem that match the specified role.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.XR](/engine/6000.5/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

> **Warning:**
>
> **Deprecated.** This API has been marked as deprecated and will be removed in future versions. Please use InputDevices.GetDevicesWithCharacteristics instead.

```csharp
public static void GetDevicesWithRole(InputDeviceRole role, List<InputDevice> inputDevices)
```

### Parameters

**** (\[InputDeviceRole]\(/engine/6000.5/script-reference/unityengine/xr/inputdevicerole)): [InputDeviceRole](/engine/6000.5/script-reference/unityengine/xr/inputdevicerole.md) that is defined for the devices returned.**** (\[List\<InputDevice>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): A List of type InputDevices to receive the available input devices.
