Can't force unity builder to keep my resource byte files
I try using sqlite data base (both sqlite dll and pre-made database) for making a game, and I am quite unhappy with what unity does to my database, even if I import database file as a .bytes resource. The code works quite fine when I run it in unity, but I get problems after building the code. Unity builder refuses to put my database in output files, and my code brokes. I do fix it in windows by placing the database file manually, but what to do when I am making android build? Well, I've read something that I can open the apk file with winrar and put some files there, but I didn't quite get what encription key procedures I should make to make the new apk file valid. What is even more worse, while sqlite3.dll exists in windows build, I can not find it in android build.
What can I do with such problems?
when you say bytes resource, do you mean you've put them into a resource folder? If not and those are not referenced in any scene, you should probably do that because they won't get packed otherwise.
Thanks for your help, but now I've got problems with resorc mechanisms of Unity. I searched for how to work with resources in unity. So, I've made a "Resources" folder in Assets and imported there a tmp.txt withone string. Then I've put the next code to $$anonymous$$ainCamera:
public GameObject text1; // assigned a text in editor for this void Start () { Text txt1; txt1 = text1.GetComponent(); TextAsset textDoc = Resources.Load ("/Resources/tmp.txt") as TextAsset; if (textDoc == null) txt1.text = "null"; else txt1.text = textDoc.text; ... }
So, I tried to put different arguments ins$$anonymous$$d of "/Resources/tmp.txt", like "tmp.txt", "\Resources\tmp.txt", "" but I always get "null", not the string that there is in a text file.
Can you help me with this?
Your answer
![](https://koobas.hobune.stream/wayback/20220612100851im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to load resources? 1 Answer
Keep a file from assets after build 0 Answers
Resources folder empty in Build and public variables NullReferenceException 1 Answer
Is there a way to reveal resources in the built folder structure? 0 Answers
Is it possable to exclude some objects from loading in the editor before building? 0 Answers