My game uses big const data which i need to retrieve it to use data used on each level when its needed data security is important
I got two options in my head which one is better?
Note the data is const and it never changes during game and only i can change it on coding for using it on some levels and after build it always same data
1: using return "data"
Something like this which means data stored in script and finding script will expose data
if(level_number < 10)
{
switch level_number
case 1:
return data_1;
.
.
.
}
if(10<level_number <20)
{
.
.
.
}
2: saving in binary file
Check if the file exist read it and if it isn't then create it during game and use it next time
This one uses binary formatter to save/load data and there is two options for this too
2.1: creating file during game which still have same problem like first solution
2.2: creating file on the editor and load it from plugin folder etc
And second one also have storage usage when first one just a script which returns some const data
I know you cant stop hackers from hacking offline file but i'm also looking better way to save this big const data and retrieve it to use it
Which one is better and if you have better solution i'm happy to hear it