I am using a list as an inventory system (i know, not the best solution) and i need to remove an item form list preferably by name.
ex potion
wand
sword
on sword clicked. remove sword from list.
It also needs to not remove all of an object (like if i have 2 potions i only remove 1)
Develop games in your browser. Powerful, performant & highly capable.
What do you mean by list?
List object? Then yes, it's a pretty bad solution. How do you store item quantity?
Or do you mean a list in a text variable? Like "sword:2, potion:3" ?
I strongly suggest using a dictionary or array instead.