Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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
Read time 12 minutesLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine.XR
  • 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
public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, out bool value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, out uint value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<float> usage, out float value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, out Vector2 value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, out Vector3 value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, out Quaternion value)

Parameters

Usage that describes the feature to retrieve.

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Hand> usage, out Hand value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Bone> usage, out Bone value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Eyes> usage, out Eyes value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<byte[]> usage, byte[] value)

Parameters

Usage that describes the feature to retrieve.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, out InputTrackingState value)

Parameters

Usage that describes the feature to retrieve.

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<bool> usage, DateTime time, out bool value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<uint> usage, DateTime time, out uint value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<float> usage, DateTime time, out float value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Vector2> usage, DateTime time, out Vector2 value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Vector3> usage, DateTime time, out Vector3 value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

value

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<Quaternion> usage, DateTime time, out Quaternion value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

boolTrue 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
public bool TryGetFeatureValue(InputFeatureUsage<InputTrackingState> usage, DateTime time, out InputTrackingState value)

Parameters

Usage that describes the feature to retrieve.

A DateTime struct with the local time at which to query for data.

A variable of the appropriate type to receive the information about the feature.

Returns

Type

Description

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