Best way to save randomly generated items?

Lets say i pick up an item. It will have a number id to identify which type of item it is (shield or sword for example) and randomly generated (on pick up) attributes (positivedmg, negativedmg, etc). All floats.

Thinking about having maybe 50 items at most. Single player game, doesnt matter if people cheat.
I have read a bit about playerprefs but i dont think its gonna work well. Ideas?

Player prefs would work fine or literally any other method of serialisation.

All you need to do is convert your objects to some sort of parsable string or serialised data format and then read and write that from a file.

Player prefs do all that for you but its pretty trivial to choose a different format. I prefer JSON or binary files personally but there is no reason that playerprefs wont work.


As an aside I think your methodology is a little naive.

Do some reading on factory patterns and data serialisation


Reading

Watching
----------