- Home /
Encrypting / Verifying script files
I noticed that I can make a game, build it and run it just fine, but the scripts that is necesserry for the game to work, is easy to tweak and modify and basically hack the game. Just go into the files and edit with notepad or whatever. My question is: Can you encrypt the scripts or make a verifier ( Possibly connected to an internet file that no one can edit ) to verify that the files are not tweaked with?
PS: I’m sorry, but I wans’t sure what topics I should use for this question.
The source code for your built game is editable? Even the WebGL builds that use JS are unintelligible for text editors, are you talking about the .cs files?
Those aren't included in the build, everything gets compiled. Do you mean that you're worried someone will change them while you're still working on the project?
It was just that qhen I build it and go into the files in file explorer, I can go to Project/Assets/Scripts/$$anonymous$$yScript.cs and edit it. But I have tried to export tr exe file and run it alone, but it didnt work. Is there any dll or lib I need to include?
Yeah that's your source, but that isn't the built version. Where are you saving the built project? Go look there and see just what your project looks like afterwards.
Im saving the build exe in the Project folder (Not the asset folder)
$$anonymous$$ake an empty folder somewhere called "Build" and set that as your build destination. You will see a bunch of DLLs and other hard files, but no .cs files.
And the .dlls are hack proof(ish)? And can I make a verifier just if I have custom .txt files that I write and read to verify with some file I have on an online server?
Nothing is hack proof, only ish. If someone has a decompiler like ReSharper, then it's always possible to spoof your DLLs. As for your original question, I think you now see that the .cs and other source files are not included in the build. What you're veering into now is compiler security. If you're curious about that, then ask a different question so that more qualified people will see it.
Your answer
Follow this Question
Related Questions
How to use Animator Override Controler in script? 0 Answers
Random generation 1 Answer
How to assign script to inspector variable 2 Answers
Unity 5 C#, having a script show up in a path in the Editor 1 Answer
UnityEngine.UI.dll 0 Answers