When i try to get the callback context from a gamecontroller trigger i get the following error:
all i am asking is :
void OnRightTrigger(InputAction.CallbackContext context)
{
if (context.started)
{
RightArm.targetRotation = Quaternion.Euler(new Vector3(0, RightArm.targetRotation.y + -90, 0));
}
else if (context.canceled)
{
RightArm.targetRotation = Quaternion.Euler(new Vector3(0, 0, 0));
}
}
error:
MissingMethodException: PlayerMovement.OnLeftTrigger Due to: Attempted to access a missing member.
System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at <e8645a79b0794e0e9a2b5bbff081b88a>:0)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)