I'm doing some exercise on Unity/C#, and for one of them I have a list that contain some inherited classes.
public List<Item> items = new List<Item>();
each Item is an inherited class like PowerUp,ConceptArt,Bonus who all iherit from Item...
I would like to, sort that list using the name of the item class.
Basically if i have list
myList = { Bonus,ConceptArt, PowerUp, PowerUp,ConceptArt }
if I sort it, the output would be :
myList = { Bonus,ConceptArt, ConceptArt, PowerUp,PowerUp}
How do I do that?
I don't know if I explained myself clearly. If i need to edit, tell me :)
thx :)