Question by
gokturk1 · May 06, 2020 at 09:56 PM ·
textandroid buildefficiencyfile-io
Reading specific line from .txt file on Android build
Hello everyone! I was making a dictionary game and I am using txt file for words and currently txt file have over 13.000 words with 1 word on each line. My game works totaly fine on PC but I couldn't handle getting new word from this txt file on Android because I am using this line on PC
string line = File.ReadLines("Assets/TxtFiles/AbcEnglish.txt").Skip(wordNumber).Take(1).First();
this will return a single word without reading every single line and holding it in memory but when I build the game on Android text file is gone and even if I use TextAsset I coulnd't find an efficient way to get a single line from TextAsset.text . So in the end won't able to return a word or I will be able return a word with huge memory usage. Hope I did explained my problem good enough and thanks in advance.
Comment