Skip to content

Mono ​

When you build a Unity game with the Mono scripting backend, Unity ships the game's managed code in .NET assemblies (.dll files). These assemblies contain intermediate language (IL) instructions and metadata that describes types, methods, and fields. Mono uses that information to run the game, and .NET decompilers can use it to reconstruct readable C#.

What decompilation reveals ​

Decompiled code is not an exact copy of the original source. It generally lacks comments and original formatting, but it can still reveal how gameplay rules and other systems work. This is separate from extracting assets such as textures and audio: the scripting backend determines how code is compiled, not how those assets are stored.

When to use IL2CPP ​

If you want to make casual inspection of your game's scripts harder, consider using IL2CPP on supported target platforms. IL2CPP compiles managed code into a native binary, so a standard .NET decompiler cannot recover the game's method bodies from managed DLLs as it can with a Mono build. It does not make the code impossible to analyze.

If you switch backends, test a built player on each target platform. Pay particular attention to code and plugins that use reflection or runtime code generation, since some patterns that work under Mono need changes under IL2CPP.