So, I’m stuck on the part where we put in the input manager into the Player State Machine in the inspector. I’ve followed everything step by step, but instead of getting a new window in the inspector I get the following error: Assets\Scripts\InputReader.cs(7,43): error CS0535: ‘InputReader’ does not implement interface member ‘Controls.IPlayerActions.OnDodge(InputAction.CallbackContext)’
Here’s the block of code in question.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InputReader : MonoBehaviour, Controls.IPlayerActions
{
public event Action JumpEvent;
public event Action DodgeEvent;
private Controls controls;
void Start()
{
controls = new Controls();
controls.Player.SetCallbacks(this);
controls.Player.Enable();
}
private void OnDestroy()
{
controls.Player.Disable();
}
public void OnJump(InputAction.CallbackContext context)
{
if (!context.performed)
{
return;
}
JumpEvent?.Invoke();
}
public void OnDodge(InputAction.CallbackContext context)
{
if (!context.performed)
{
return;
}
DodgeEvent?.Invoke();
}
}