Похожие чаты

Hi, I'm creating a word learning app. I store the

data in a #binary file. I created a dll library to create, edit, load the file. I created the file and it works fine in the editor but when I build the app the file is empty.

Anyone knows why?

17 ответов

9 просмотров

Uhh.. this is a game development group. Also your question doesn't have enough details for anyone to answer properly.

Amir Rahmani
I'm working on it.

Yeah, share more details and then someone interested in your problem will probably help you

Amir Rahmani- Автор вопроса
Manav | avoid unnecessary messaging me
Yeah, share more details and then someone interest...

Right now I know it's about the file path. I googled it and I get that the assets folder is going to be pack in the android build so I can't use the normal method that I use in the editor, Path.Combine(Application.dataPath, "Data/PlayerData.epld"); I installed the "Addressable" package and I'm trying to solve the problem with that.

Hmm, you're written your own persistent storage library. Do paths here help? https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html

Btw I think you should let loading and file operations be handled by unity, your custom library should store the contents in some string buffer, parse and do your custom modifications to the string buffer. And then ask unity to write the string buffer to the actual file

Amir Rahmani
let me try it

Also tell us if you've found a solution

Amir Rahmani- Автор вопроса
Manav | avoid unnecessary messaging me
Also tell us if you've found a solution

The only thing that worked was to add the words(Data) manually to the binary file. And save the file to the persistentDataPath I will end up with an script with thousands of lines of code. I realized that it's more easier than even reading data from a text file. Even faster.

Amir Rahmani- Автор вопроса
Amir Rahmani
The only thing that worked was to add the words(Da...

I mean every single word with a line of code.

Похожие вопросы

Карта сайта