getnamo / NodeJs-Unreal

Embed node.js as an Unreal Engine plugin.
MIT License
239 stars 34 forks source link

How to hide the script files #38

Closed WailedParsley36 closed 2 years ago

WailedParsley36 commented 2 years ago

Hello, I wrote a firebase database and authentication script, but now I realised that if I package the game, users will see the scripts and can even modify it. So my question is how to hide the .js (script) files, or variables and how to disable modification of these files/vars. If its not possible do you know some alternatives? Or a way to include Firebase SDK in Unreal?

PS: I tried their REST API, but their auth token is not working

Thank you in advance.

getnamo commented 2 years ago

You could probably do a hash of the files you wish to stay fixed and then check against the hash before you run the script, if not matching, don't run it.

As for hiding the files, I'm not sure maybe you can use a minimizer e.g. https://www.npmjs.com/package/node-minify, but I'll admit I don't have much experience with this aspect yet.

WailedParsley36 commented 2 years ago

Thank you for your very quick response. I totally forgot about the hashing option. I am an idiot. I am sorry to bother you with this. Have a nice day.