Hello,
I hope I’ve posted this in the right section and all, I’m new to this Unity Answers Thing, so forgive me any mistakes I could have done.
But now to my problem, I’ve been stuck with this a couple days now, but I just can’t get it to work.
So basically, I want to, whenever I build my game, to increment a variable containing information about the version of the product and the current build number, save a binary file containing that information INTO the GAME DATA folder (not %appdata% or anything, but pack it right withing the game itself) and then anytime the game is played (!Application.isEditor), load that file, deserialize it, get the build and print it onto an UI, so the user knows exactly which version and build he is using.
Saving and loading works and incrementing the build number and all that stuff, the problem comes now - when I have to decide how and where to save the file.
I’ve found method of return type string called Application.dataPath, which gives me the path to the data folder. When I print this while inside the editor, this gives me the path to Assets/ folder.
So I thought I’ve suceeded now.
But when the game is build, that assets folder gets packed into various files and folders and I have no idea where it at the end lands. When I print this Application.dataPath string while playing the built .exe though, it leads to the folder next to my .exe called _Data, but this one doesn’t contain the files from Assets/, so even my file that contained the build number and version is gone. It exists, but it is somewhere packed inside the .assets files or something like that.
Anyone got some idea how I could fix this? Or even a complete different, better way of implementing such build and version tracking?
Thanks in advance,
Skrypt