Page 1 of 1

Best Practice obscuring data

Posted: Mon Oct 16, 2017 11:26 pm
by Dak_796
I have a large spreadsheet of data (.csv) that I am loading into arrays in playmaker.
I edit this .csv in Excel- it contains the attributes for an unlockable system- and I am loading it from resources.
I am using excel/.csv because it is so much easier to manipulate/edit the data as I am working on it.
Everything works fine right now, but I am concerned about it being easily hacked by end users.

Is there a better pattern using ES2/Playmaker that would obfuscate the data while remaining easy for me to edit in excel during development?
Thanks,

Re: Best Practice obscuring data

Posted: Wed Oct 18, 2017 7:09 am
by Joel
Hi there,

Unfortunately there's no way we're aware of to do this as there's no way to obfuscate the data in a way which would be readable by spreadsheet software.

All the best,
Joel

Re: Best Practice obscuring data

Posted: Thu Oct 19, 2017 11:28 pm
by Dak_796
Hi Joel,

I don't have to read the data back into excel- it is a one-way trip and the data is not modified. I just want the source to be easy to manipulate.

I can export the data from Excel as .json or .xml (anything I can read back in Playmaker)- but is there a way to encrypt that data using ES2 (not at runtime), store it in my build, and read it back with ES2 at runtime? This must be a commonly solved problem- I think I am just missing something.

Thanks!

Re: Best Practice obscuring data

Posted: Fri Oct 20, 2017 7:12 am
by Joel
Ahh, I understand. I've created a UnityPackage below which adds an Editor script (EncryptFile.cs) to your project which exposes an Encrypt Text File menu item in Assets > Easy Save 2. This opens a dialog allowing you to encrypt a file with the password defined at the top of the EncryptFile script. Note that this will overwrite the original file.

You can then use the Load String action with encryption enabled to load and decrypt the data, using the tag defined at the top of the EncryptFile script. You'll also want to ensure that encrypt is checked, and the Encryption Password is set to your password.

All the best,
Joel