# TryGetFeatureValue

> Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

## Definition

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

## TryGetFeatureValue(InputFeatureUsage\<bool>, bool)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, out bool value)
```

### Parameters

**** (\[InputFeatureUsage\<bool>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<uint>, uint)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, out uint value)
```

### Parameters

**** (\[InputFeatureUsage\<uint>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<float>, float)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<float> usage, out float value)
```

### Parameters

**** (\[InputFeatureUsage\<float>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Vector2>, Vector2)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, out Vector2 value)
```

### Parameters

**** (\[InputFeatureUsage\<Vector2>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Vector3>, Vector3)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, out Vector3 value)
```

### Parameters

**** (\[InputFeatureUsage\<Vector3>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Vector3]\(/engine/6000.5/script-reference/unityengine/vector3)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Quaternion>, Quaternion)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, out Quaternion value)
```

### Parameters

**** (\[InputFeatureUsage\<Quaternion>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Quaternion]\(/engine/6000.5/script-reference/unityengine/quaternion)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Hand>, Hand)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Hand> usage, out Hand value)
```

### Parameters

**** (\[InputFeatureUsage\<Hand>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Hand]\(/engine/6000.5/script-reference/unityengine/xr/hand)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Bone>, Bone)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Bone> usage, out Bone value)
```

### Parameters

**** (\[InputFeatureUsage\<Bone>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Bone]\(/engine/6000.5/script-reference/unityengine/xr/bone)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Eyes>, Eyes)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Eyes> usage, out Eyes value)
```

### Parameters

**** (\[InputFeatureUsage\<Eyes>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[Eyes]\(/engine/6000.5/script-reference/unityengine/xr/eyes)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<byte\[]>, byte\[])

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<byte[]> usage, byte[] value)
```

### Parameters

**** (\[InputFeatureUsage\<byte\[]>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[byte\[]]\(https\://learn.microsoft.com/dotnet/api/system.byte)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<InputTrackingState>, InputTrackingState)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, out InputTrackingState value)
```

### Parameters

**** (\[InputFeatureUsage\<InputTrackingState>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[InputTrackingState]\(/engine/6000.5/script-reference/unityengine/xr/inputtrackingstate)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<bool>, DateTime, bool)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, DateTime time, out bool value)
```

### Parameters

**** (\[InputFeatureUsage\<bool>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<uint>, DateTime, uint)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, DateTime time, out uint value)
```

### Parameters

**** (\[InputFeatureUsage\<uint>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<float>, DateTime, float)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<float> usage, DateTime time, out float value)
```

### Parameters

**** (\[InputFeatureUsage\<float>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Vector2>, DateTime, Vector2)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, DateTime time, out Vector2 value)
```

### Parameters

**** (\[InputFeatureUsage\<Vector2>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Vector3>, DateTime, Vector3)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, DateTime time, out Vector3 value)
```

### Parameters

**** (\[InputFeatureUsage\<Vector3>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[Vector3]\(/engine/6000.5/script-reference/unityengine/vector3)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<Quaternion>, DateTime, Quaternion)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, DateTime time, out Quaternion value)
```

### Parameters

**** (\[InputFeatureUsage\<Quaternion>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[Quaternion]\(/engine/6000.5/script-reference/unityengine/quaternion)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.

## TryGetFeatureValue(InputFeatureUsage\<InputTrackingState>, DateTime, InputTrackingState)

Retrieves information about the input feature specified by the Usage parameter. Those functions which take a time parameter allow querying for that feature at a particular point in time

```csharp
public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, DateTime time, out InputTrackingState value)
```

### Parameters

**** (\[InputFeatureUsage\<InputTrackingState>]\(/engine/6000.5/script-reference/unityengine/xr/inputfeatureusage)): Usage that describes the feature to retrieve.**** (\[DateTime]\(https\://learn.microsoft.com/dotnet/api/system.datetime)): A DateTime struct with the local time at which to query for data.**** (\[InputTrackingState]\(/engine/6000.5/script-reference/unityengine/xr/inputtrackingstate)): A variable of the appropriate type to receive the information about the feature.

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the feature information is retrieved; otherwise false. |

### Remarks

See XR.InputDevice.CommonUsages for valid usages that can be used to retrieve input values.  Note: not all of these features will be available on all devices.  If a feature is not available this function will return false.
