Even games must store data like top scores. In this article, Lance Talbert explains how to save data using MySQL with Unity.

SQL is the language of data management, and Unity is a game engine. The two seem to have very different goals, with one focusing on managing a database while the other is built primarily for the creation of video games. Can the two work together? As is so often the case in the world of programming, the answer is a resounding “yes.” As far as the games industry is concerned, databases are most useful in applications that require items like leader boards, stat tracking, and more. While a single-player focused adventure game may not need database integration, a massive racing game with thousands of players might.

With this in mind, a demonstration is in order. An app will be created that can receive the high scores stored within a MySQL database as well as put new data into it. Within the app itself, the top five players and their scores will be displayed. A variety of tools will be used to accomplish this. This demonstration uses WampServer and phpMyAdmin to create the database, PHP for server scripts, and of course, Unity and C## for app creation. If you’re more comfortable with other database management and creation tools, then those should work just as well for this project.

#sql prompt #mysql #unity

Using MySQL with Unity
1.20 GEEK