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?
Uhh.. this is a game development group. Also your question doesn't have enough details for anyone to answer properly.
Yeah, share more details and then someone interested in your problem will probably help you
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.
Um, which game engine are we talking about?
Say that first lol
Lemme see what persistent storage options unity provides
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
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.
I mean every single word with a line of code.
Обсуждают сегодня