Save Game Free provides an integration for Web usage that provides the capability to persist data via MySQL databases, this integration is available at the Save Game Free unity package file under BayatGames/SaveGameFree/Web folder, there is a compressed file called Save Game Free – Web.zip, in this archive there is two files:
- savegamefree.php is the file that processes requests and saves and loads data.
- savegamefree.sql is the SQL file that you need to execute on the host control panel to create the database and table.
As mentioned above, you need to first setup the database and tables by executing the savegamefree.sql file on your host control panel (it is called PHPMyAdmin on some localhost environments) and then you need to open savegamefree.php file and provide the details to connect to the database:
define(‘DB_USER’, ‘root’): it is the username that you use to log into your database
define(‘DB_PASS’, ‘root’): it is the password that you use to log into your database
define(‘DB_NAME’, ‘savegamefree’): it is the name of database for saving and loading the data
define(‘DB_TABLE’, ‘savegames’): it is the name of the table to store data
After all, you are ready to go, Good luck!