Xampp mysql database problem

Hi, I am still new to Unity especially in Database.
I created a windows application of an indoor navigation where users can search for specific room name and the the navmesh agent will locate. I use Xampp MySQL database to store the objects or rooms x,y,z location with its room name. The problem is that in playmode within the editor, the searching function is working but when I build and run the program, the searching functionality is not working, how do I resolve this problem? Thanks in advance for helping me.

Databases can be extremely tricky to integrate in Unity, especially cross-platform. Make sure you followed ALL the steps for integrating it, then start with the device logs and basic debugging to ensure you’re calling the right code, not getting an exception, etc.

Unity has ScriptableObjects, which in my opinion are FAR simpler to use than a database, at least for simple data like enemy positions.

The only database package I ever successfully used at any kind of scale or regularity was this one:

This SQLite package works on Android, iOS, MacOSX and Windows:

Read these SQLite considerations carefully:

Beyond that, here’s how to debug:

By debugging you can find out exactly what your program is doing so you can fix it.

Use the above techniques to get the information you need in order to reason about what the problem is.

You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.

Once you understand what the problem is, you may begin to reason about a solution to the problem.

1 Like

I was just thinking to switch database from MYSQL to Microsoft Sql Service and I think as you said, it is a bit tricky same as if I will use Microsoft Sql Service and from your provided solution such SQLite would be the great option to choose too. Well then, thank you so much sir for your help I’ll try to figure things out and if it still not working, I’ll switch to SQLite. Thanks again!!