*[Solved]*
I’ve been having some trouble wrapping my head around the new input system specifically with calling a method member of another class. When i attempt to call that method I get a MissingMethodException.
Here is an example of what I am getting:
public class Character_Actions:MonoBehaviour, Character_Input.IPlayerActions
{
JumpingAction jump; // The class I am calling
InputControls input; // My input map class
public delegate void JumpButton( ); // delegate practice.
JumpButton testButton;
void Awake()
{
input= new InputControls ();
input.Player.SetCallbacks(this);
testButton = jump.GetComponent<JumpingAction>().Jump;
}
public void OnEnable( )
{
input.Enable();
}
public void OnDisable( )
{
input.Disable();
}
public void OnJump( InputAction.CallbackContext context )
{
if(context.performed) {
testButton.Invoke
}
}
And then I have a jump function in a different class like:
public class JumpingAction: :MonoBehaviour
{
Debug.Log(:I am jumping");
}
The method works but throws a MissingMethodException. What am I missing here?