Is it possible to change builds structures?

HI, just wondering if it is possible to change the build game structure, because i’d need to re-structure the folders and files, and i don’t want to have .assets files, i want to have my own file types.
Thanks a lot!

That would probably be very difficult. For what it’s worth: There are, for example, Obfuscators you can get which will troll through the built game files and sort-of encrypt them (really just make them less obvious what they contain). So a precedent exists for that. And if you google around how to extract assets from Unity games, you’ll find a bunch of people talking about how they did it.

Ok so you are probably going to use System.Security.Cryptography to do the encryption and create a CryptoStream that you would use to load some of your assets. The easiest thing to do would be to create asset bundles and then encrypt those files and decrypt them before using AssetBundle.CreateFromMemory on a decrypted byte array.

This would cover your assets but not your scripts.

The best way to manage scripts would be to download a chunk of your code from the server in an encrypted stream and use Assembly.Load on the decrypted byte array to load some script into the game.

A clever approach would be to automatically update such components every hour or so and have it send a GUID to the server. The server would maintain a list of currently valid GUIDs (last one, this one) and would reject the code if it was out of date or messed with and not allow any play. This does mean compiling a set of different executables or resources that have the keys.

Given that you have to decrypt these streams you will somewhere in your code have to have the key, which a hacker can find so it isn’t 100% secure (apart from the script method I just described which is secure on every period you change the code, though even this could be “auto hacked” especially if the location of the encoding did not change or was easily identifiable). But it would need to be hunted for. Don’t download keys from the server, this gives a packet sniffer more chance of identifying the keys location.