Hi,
I would like to use a local Database in my Unity project, what would be the best way to do it?
In particular I would like to use SQLite, is there some add-on that works good on all platforms? (Android, iOS,Mac,PC)
Is there an efficient way to simply use a text file as a database, if the database is not big, so I will not have problems working multiplatform?
Thanks,
slaga
November 17, 2020, 10:59pm
2
well the way i have done it is to create two scripts, mine is called database and database_get. i used unity web request to handle the data and also i made a php script that connected to a phpmyadmn database.
and this is a straight forward php guide where basically after the connection check you do your query
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
1 Like
Thanks fot your reply, I ment a local database like Sqlite.
I have not personally used SQLite on Android/iOS but there are assets available in the Unity Asset store . Also, a quick search in google resulted in this https://smartgamedev.com/posts/simplify-sqlite-unity-android-ios-sqlite4unity3d/ . It’s certainly possible to use SQLite it depends on the amount of effort you want to put in to get it working.
Is there an efficient way to simply use a text file as a database, if the database is not big, so I will not have problems working multiplatform?
You should look into JSON, XML, or even Google Flatbuffers and make the choice based on your needs