Remove item from List dont work

Hello I have problem with delete item from list. Adding work but Remove no:

public List<Lista> equippedItemsIDListLocal = new List<Lista>();
    
    [Serializable]
    public class Lista
    {
        public int playerID;
        public int itemIDD;

        public Lista(int newPlayerID ,int newItemID)
        {
            playerID = newPlayerID;
            itemIDD = newItemID;
        }

    }

And I have Add and Remove with this lines:

equippedItemsIDListLocal.Add(new Lista(iID, itemID));

equippedItemsIDListLocal.Remove(new Lista(iID, itemID));

Since Lista is a class, it is stored by reference in lists. But when you use the new keyword you create a new instance of that class, so it has its own place in memory and thus has a unique reference. What you want to do is to iterate/loop trough the list and look for the item which has the correct playerID & itemIDD. Once you found the item use RemoveAt to remove the item (you need its index).

Hope this helps!

-Gameplay4all