Basically I'm trying to save an inventory(list of items(List<Item.cs>)) and load it. But when I save it to JSON, it comes out as:
{"Items":[{"instanceID":-39626},{"instanceID":-39660}]}
Here is my code:
SaveLoad.cs:
https://pastebin.com/P65ka5WSSaving it in another class:
https://pastebin.com/4QJ1djHrItm.cs:
https://pastebin.com/yEjAKGTDI'm using this really helpful class called JsonHelper someone made here's the link:
https://stackoverflow.com/questions/36239705/serialize-and-deserialize-json-and-json-array-in-unityHere's the tutorial I was following if it helps:
I've been researching and googling how to do this and I don't understand anything I find this video I just shared is the closest thing to understanding I could get all for it to not work for me
Extra information: Sometimes I have items(Itm.cs) in my inventory that are inheriting from Itm.cs so for example I have a weapon or shield(WEAPON.cs or Shield.cs) that inherit from Itm.cs. And they both have a bool called "equipped." Will I still be able to save the list of items?
Thanks in advance