However, trying to poll the action directly for a value
var look = lookAction.ReadValue<Vector2>()
Throws a NullReferenceException
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.InputSystem.InputActionState.ReadValue[TValue] (System.Int32 bindingIndex, System.Int32 controlIndex, System.Boolean ignoreComposites) (at Packages/com.unity.inputsystem@1.1.0-preview.2/InputSystem/Actions/InputActionState.cs:2248)
UnityEngine.InputSystem.InputAction.ReadValue[TValue] () (at Packages/com.unity.inputsystem@1.1.0-preview.2/InputSystem/Actions/InputAction.cs:920)
How then should a Vector2 value be read from the OneModifierComposite?
Or, is the look action example misleading and should we use a custom composite instead?
I’m running into this same issue right now, I would figure the modifier just acts as a gate & the binding is what controls the type returned. In my case I’ve got Position as the binding, but can’t seem to read a Vector2 from it
Indeed a bug. Reading the value through InputAction.ReadValue() does the right thing but reading it through InputAction.CallbackContext.ReadValue() in a callback throws. Fixed here.