Implementing interfaces with arguments only works when the interface is generic

Hi everyone, I’m sorry if this has been asked before but I seared for a long time and couldn’t find an answer to the problem I’m having. I have an interface

public interface IAttackManager
{
int Attack(List<Vector2Int> uList);
}

and implementations of that interface

public class Unit : MonoBehaviour, IAttackManager
{
public abstract int Attack(List<Vector2Int> uList);
}

public class ParticularUnit : Unit
{
public override int Attack(List<Vector2Int> uList)
{
//Do something
}

but when I compile all this in Unity, it says I didn’t implement Attack even though I clearly did. Changing the interface to a generic like this works though for some reason

public interface IAttackManager<T>
{
int Attack(T uList);
}

and implementations of that interface

public class Unit : MonoBehaviour, IAttackManager<List<Vector2Int>>
{
public abstract int Attack(List<Vector2Int> uList);
}

public class ParticularUnit : Unit
{
public override int Attack(List<Vector2Int> uList)
{
//Do something
}

I can’t understand why this fixes the problem and why it wouldn’t work in the other case. Thanks in advance to anyone who can help!

I had to fix some unrelated errors but this compiles fine for me:

public interface IAttackManager
{
    int Attack(List<Vector2Int> uList);
}

public abstract class Unit : MonoBehaviour, IAttackManager
{
    public abstract int Attack(List<Vector2Int> uList);
}

public class ParticularUnit : Unit
{
    public override int Attack(List<Vector2Int> uList)
    {
        return 0;
    }
}

Maybe your interface and implementations are using different List<T> implementations? Then Unit.Attack would not qualify as an implementation of the interface.

If you’re using an IDE (Visual Studio, Visual Studio Code, Rider etc), you can let it generate the implementation and then you could compare the generated one to the one you’ve written yourself.