Having an issue with checking if a list contains a scriptableObject, I believe that it has something to do with the paranthesis portion of the object. Is there a way to bypass this without giving the objects some type of itemID?
Below is me trying to use the whole script containing the list of items rather than just the list but I have tried both methods.
void ProcessLoot(interactScript interactObject,int index){
//
Debug.Log(inventory.Contains(interactObject.items[index]));
if(inventory.Contains(interactObject.items[index])){
int inventoryIndex = inventory.IndexOf(interactObject.items[index]);
if(inventory[inventoryIndex].currentAmt + 1 < inventory[inventoryIndex].maxAmt){
inventory[inventoryIndex].currentAmt++;
}
else{
inventory.Add(interactObject.items[index]);
}
}
else{
inventory.Add(interactObject.items[index]);
}
interactObject.items.RemoveAt(index);
}