Please, help me with errors
[10:09:08] Assembly ‘Library/ScriptAssemblies/Assembly-CSharp.dll’ will not be loaded due to errors: Reference has errors ‘MySql.Data’.
[10:09:08] Assembly ‘Library/ScriptAssemblies/Assembly-CSharp-Editor.dll’ will not be loaded due to errors: Reference has errors ‘Assembly-CSharp’.
[10:09:08] Assembly ‘Assets/Libraries/MySql.Data. dll’ will not be loaded due to errors: Unable to resolve reference ‘Google.Protobuf’. Is the assembly missing or incompatible with the current platform?
I done all from this site and i have error
[09:26:51] Unloading broken assembly Assets/Libraries/MySql.Data.dll, this assembly can cause crashes in the runtime
But for games, it’s the right choice if you absolutely need a database. You should avoid MySQL/SQL Server/Oracle/Postgres/MariaDB which are overkills, since they need a running database server, while SQLite does not need a server at all (it’s just a file).
You won’t ask your players to go and install a MySQL server on their machine just to run your game? right?
This sort of comment makes me wonder if you really even need a database. Hardly anybody uses databases in gaming at the client level. Are you sure that you actually need this level of intense complexity???
ScriptableObjects are usually how data is authored. It is FAR simpler to use right in the editor.
Do you really need any advanced 3D/2D Graphics in your app? if it’s just an admin/tool app, maybe it’s just simpler to use plain .NET and one of its UI frameworks (WinForms, WPF, MAUI, UWP, WinUI…) and not fight against Unity which was not meant to be used to access any database servers.
But where do you host your database? You NEVER directly connect to a mysql database over the internet. Depending on the rights the DB user has, a user could completely screw up your database or manipulate whatever he wants or in the mildest case get access to things he shouldn’t. That’s why interaction with a database from a game is almost always mediated through an API on a server, most commonly a webserver. For example a php script which does do the database interaction and provides concrete methods / end points that your game can use / query.
You can’t really implement any security or measures against manipulation or any other sort of attack when you expose a DB server directly to the internet. They are not designed for that.
Since you seem to be very inexperienced with databases, just a friendly warning: you get into very dangerous territory. Especially since you said “account management” you may risk other peoples personal data which can get you into real trouble.
Are you working on your own or do you work for a company? Because such design decisions should be made by more experienced developers.
Maybe have a look at this gd.se question. The list of reasons why you shouldn’t expose or use a mysql server over the internet is endless.
When you distribute your game (or any app), it’s extremely easy for anybody to decompile your code and have access to any connection string/credentials (username, passwords). Heck even without decompiling, anybody could sniff the packets of your network connection to your database and get the credentials.
TLDR: Create and use an API instead. It’s very easy.