Unity: How to save and load data using json and Base64

<p>Saving and loading game data is an essential part of almost any game. These two processes should be fast, efficient and error-prone since nothing is more painful for a gamer than losing progress he has been working on so hard.</p> <p>In this tutorial I will show you an easy way to save and load your data applying a technique that makes it unreadable by the naked eye &mdash; Base64 encoding. The good part is that you will need to implement it only once, afterwards you can simply copy\paste it to all new projects changing underlying models.</p> <h1>Prerequisites</h1> <p>For this tutorial I&rsquo;ve partially reused the swipe game mechanics from my latest game. In order to destroy a ball, player should swipe in the correct direction &mdash; white side of the ball. Each wrong swipe will reduce remaining life. Occasionally collectible stars will be added to stars count.</p> <p>Then we will save incorrect swipes total count into a&nbsp;<em>results&nbsp;</em>file and collected stars total count into&nbsp;<em>stars&nbsp;</em>file.</p> <p><a href="https://pudding-entertainment.medium.com/unity-how-to-save-and-load-files-using-json-and-base64-a033def09a47"><strong>Learn More</strong></a></p>
Tags: JSON Base64