- Home /
Is it bad to use csv/xml resource to read data for mobile
I'm setting up a store in my game where users can purchase in game currency for real money and virtual items for in game currency.
I currently read the information about prices, descriptions and quantities from either a CSV table or XML file resource that I read from my Resources folder at runtime.
I intend for my game to be played on mobile platforms primarily. Is is easy to hack this data or is it safely packaged inside the apk/app file?
Is it better to hard code these numbers in a C# class instead?
Answer by ctrSciGuy · Jul 23, 2015 at 01:31 AM
Neither solution provides safety from hacking. You'll have to encrypt them to do that. Having a resources folder makes some overhead, you can get around that by assigning a TextAsset from the inspector for each file and then dropping the XML file into that slot. Then just don't make any Resources folders. As for security of the data, encrypt it and decrypt at runtime (preferably when loading the game.)
Thanks, that answers my question! I'm looking into implementing Soomla's store module to manage my store assets - it seems to handle the encryption and decryption out of the box.
Your answer
Follow this Question
Related Questions
Best practice to store levels and highscores etc 2 Answers
whats the best way to save a large list of variables? 1 Answer
Save player data 0 Answers
Unity C# Post XML to endpoint 0 Answers