Any questions? Ask us:

Protecting Unity compiled game with Enigma Protector

This thread is for tutorials only!

Protecting Unity compiled game with Enigma Protector

Postby snura » Thu May 04, 2017 7:19 pm

This is my second installment after quite understanding ins and outs of unity compiled games,
The most important things in unity compiled game are :
Code: Select all

Note : * (asterisk) means all filename matching any alphabetically naming for example : Assembly-CSharp-firstpass.dll, System.Core.dll, Mono.Security.dll, UnityEngine.UI.dll, UnityEngine.Networking.dll, etc.

The Idea behind these is to using "CHECK-UP" -> "External Files" for protecting unity-player-exe-name_Data/sharedassets[NUMBERS].assets and engima protector's virtual box function to protect the dll.

Why not protecting the sharedassets[NUMBERS].assets inside virtual box? because as you know, most of the unity's assets are bundled into those sharedassets[NUMBERS].assets format, and some times the file size might goes above gigabytes of size (depending on your project). So it wise to just use checksum, filesize, datetime check in this "CHECK-UP" -> "External Files" checks.

Enough into, let gets into working on protections :
    1. Build the attached example project using unity (in this example, it reside "Built" folder.
    2. Open Up enigma protector, setup the Input -> "select file to protect" as "Enigma.exe" (in this example project), and tick "Output file name is same as input file".
    3. Enter any details or left as it is the "Produt Information"
    4. Make sure to left minimal protection options in enigma protector as we need to make sure first that the protected files are working as it should.
    5. Now go to "CHECK-UP" (expand it) -> "External Files"
    6. Right click on "Checkup Files", "New Root Folder" -> "%DEFAULT FOLDER%", why this means is to make sure enigma correctly checking in to current folder in which the "Enigma.exe" is located.
    7. Highlight and right click the "%DEFAULT FOLDER%" and put it the name "unity-player-exe-name_Data" in this example the unity player executable name is "Engima.exe" so put it "Enigma_Data"
    8. Highlight and right click the "Enigma_Data" and choose "Add File(s)", a browse dialog box will appear, and browse into "Enigma_Data" folder, and pick one file "sharedassets0.assets" -> Click "Open" Button.
    9. Highlight and right click the "sharedassets0.assets" and pick "properties", tick "checksum", "datetime", "size".
    10. Now protecting the sharedassets files has finished in this unity example project, go on next steps.
    11. On "VIRTUAL-BOX" -> "Files", tick the "Enable Files Virtualization", "Delete Extracted files on exit" and "Compress files" (might slow down the protected executable loading times! but minizing the protected executable file!.).
    12. Highlight and right click the "Virtual Box Files" and pick "%DEFAULT FOLDER%" -> click "OK".
    13. Highlight and right click the "%DEFAULT FOLDER%" and choose "New Folder" and name it as "Enigma_Data"
    14. as the dll is inside the "%DEFAULT FOLDER%/Enigma_Data/Managed", highlight and right click the "Enigma_Data" and choose "New Folder" and name it as "Managed".
    15. Highlight and right click the "Managed" and choose "Add file(s)", browse to "Enigma_Data/Managed", and pick files "Assembly-CSharp.dll", "Mono.Security.dll" , "System.Core.dll", "System.dll", "UnityEngine.dll", "UnityEngine.Networking.dll", "UnityEngine.UI.dll".
    16. This is quite important, on "VIRTUAL BOX" -> "Options", check / tick the "share the virtual system to child processes".
    17. Click "Protect" button.

As "Assembly-CSharp.dll", "Mono.Security.dll" , "System.Core.dll", "System.dll", "UnityEngine.dll", "UnityEngine.Networking.dll", "UnityEngine.UI.dll" is already inside the protected executable, you can delete now the :
Code: Select all

Congratulations!, now you have protected the example unity compiled game with no noticeable performance downgrade (you can check it by noticing the fps counter on top left corner).

Note : I suggest to obfuscating the codes or dlls first before protecting it with enigma protector, as enigma protector specific use is not for protecting .net applications, enigma protector only means to add another layer of 'security' & 'protection', this doesn't means that 'motivated' & 'experienced' individuals won't be able to crack/hack your games but it just mean to protect you from 'script kiddies'.

Notable unity specifics obfuscator can be found hereand here.

Video tutorial coming soon.

You can download the Enigma protector & Unity Project files in here.

Note : Needs winrar 5.x to open the archive!.
Posts: 15
Joined: Sat Sep 05, 2009 11:58 pm

Re: Protecting Unity compiled game with Enigma Protector

Postby Enigma » Mon May 22, 2017 11:09 am

Hi snura,

Very great and carefully explianed tutorial!

Thank you very much!

Could you please contact us at, we would like to share your tutorial on our blog site!
Site Admin
Posts: 2138
Joined: Wed Aug 20, 2008 2:24 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests