Store data as string

Hey everyone. I am working on a save system for my game as well as a way to send data over a network and I was wondering if there is a way to convert different types of data into a string. For example, I know that you
take an array of ints and turn them into a string, but all that is doing is taking the number 1, for example, and turning into the character “1”. I’m looking for something that can convert it to it’s binary equivalent and back. Have other people tried this? Is there a better way to accomplish this? Any help would be appreciated.

Thanks!

You’ll want to look at serialising. There are several methods of doing this and the best one depends on your needs, but in most cases something like this will be fine: How to Save and Load Your Players' Progress in Unity

You can of course customise exactly what you sync - I tend to have methods that extract the values I want from various places and build them into a Dictionary, which I then serialise.