• Hello
Search Results for

    Show / Hide Table of Contents

    Description

    An Obfuscator is a software tool that transforms the source code of a game, app, or program into a version that is significantly harder for humans to understand, while still preserving its original functionality. It does this by renaming variables, methods, and classes to nonsensical or misleading names, and by altering the code structure in ways that obscure its logic and flow.

    The primary purpose of an Obfuscator is to protect the intellectual property of the software. By making the code harder to read and analyze, it becomes much more challenging for unauthorized individuals to reverse-engineer, replicate, or modify it. This added layer of security helps prevent software piracy, intellectual property theft, and unauthorized tampering, safeguarding the developer's work and investment.

    Obfuscator

    GuardingPearSoftware's Obfuscator is built specifically for Unity. It takes Unity's unique characteristics into account – such as MonoBehaviours, ScriptableObjects, Serialization, and Reflection – giving you a powerful yet easy-to-use, out-of-the-box tool.

    Integration

    Game developers face a mountain of tasks every day, so our Obfuscator was designed for seamless integration into your existing workflow. No complex setup, no headaches – just pure plug & play. Once activated, it automatically obfuscates your code on every build, safeguarding your game without slowing you down.

    Figure 1 - The integration is designed to be plug & play.

    Code - Example

    The most important and well-known feature of an Obfuscator is the so-called 'Lexical Obfuscation'. This technique targets the most accessible elements of your code: the identifiers. For instance, a class name like 'Sale' could be transformed into 'a', a method name such as 'CalculateDiscount' might become 'p', and a variable name like 'customerData' could turn into 'x'. This process strips away the semantic meaning that makes the code understandable, making it significantly harder to interpret.

    Figure 2 - Example: Your code before and after obfuscation.

    String - Example

    String obfuscation transforms readable strings in your code into a format that is difficult to understand or recognize. This protects sensitive information from being easily extracted or deciphered by unauthorized users.

    Warning

    Never store passwords or API keys inside your shipped application.

    Figure 3 - Example: Your strings before and after obfuscation.

    Control Flow - Example

    This technique deliberately obscures the natural flow of your code – the loops, conditional statements, and function calls. Imagine a labyrinthine structure where the path twists and turns, making it difficult to follow the program's logic.

    Figure 4 - Example: Your method flow before and after obfuscation.

    Note

    Only supported on Mono builds. IL2CPP cannot interpret this protection scheme – which is also by design.

    Security - Example

    Additional security measures are available to further enhance your application's protection. These include generating random code, suppressing ILDasm (the disassembler in the IDE), and implementing micro checks. Together, these techniques make your code much harder for attackers to read and analyze, increasing overall security.

    Figure 5 - Enhanced security measures are available to improve your application's protection.

    Settings

    Every game is unique and deserves a tailored approach to protection. The Obfuscator offers a wide range of customizable settings that let you fine-tune the protection strategy to best fit your game.

    Figure 6 - Customize the obfuscation, security, compatibility and integration.

    In This Article
    Back to top GuardingPearSoftware documentation