Hello!
I know of course that the topic is hackneyed, but what day I can’t connect to the SQLite database on my phone. I write the game on Yunka and everything works great on the computer, but on the phone it doesn’t plow anything, requests do not go to any.
The old methods of 2016 (copying the database using WWW) no longer work, and I cannot find new ones. In the code I have already tried a lot of ways.
The database is stored in the Assets / Database folder. In addition, it is still in the folder StramingAssects. But it still does not work and does not find this folder, because Yunka writes that the method is outdated.
if(Application.platform == RuntimePlatform.Android) { path =Path.Combine(Application.persistentDataPath,"/Database/gb.bytes.db"); if(!File.Exists(path)) { WWW db = new WWW("jar:file://"+Application.dataPath+"!/assets/Database/gb.bytes.db"); while(!db.isDone){debug.text = "База данных пока не загружена";} File.WriteAllBytes(path,db.bytes); } }
I would be very grateful for the information)