Method TryReadValue
TryReadValue(out Quaternion)
Try to read the current value from the input source.
Declaration
public override bool TryReadValue(out Quaternion value)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | When this method returns, contains the current value from the input source. May return |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the current value was able to be read (and for actions, also if in progress). |
Overrides
Remarks
You can use the return value of this method instead of only using ReadValue() in order to avoid doing
any work when the input action is not in progress, such as when the control is not actuated.
This can be useful for performance reasons.
If an input processor on an input action returns a different value from the default Quaternion
when the input action is not in progress, the outvalue returned by
this method may not be default(TValue) as is typically the case for Try- methods. If you need
to support processors that return a different value from the default when the control is not actuated,
you should use ReadValue() instead of using the return value of this method to skip input handling.