Which versions of Unity® do you support?

Unity 4.2.0 onwards, including Unity 5, 2017/2018. Each release is tested against multiple different Unity versions.

Do you support the new Assembly Definition files in 2017.3?

Simultaneously obfuscating multiple assemblies has been a feature for a while.

If you are using version 2.0.0 then this can be done within the options inspector, see the PDF documentation for further details.

If you are using version 1.26.0 you can manually configure it by making the following change to the Editor/Beebyte/Obfuscator/Config.cs file:

    private static readonly string CSHARP_FIRSTPASS_DLL = "Assembly-CSharp-firstpass.dll";
    private static readonly string MAGIC = "Magic.dll";
    private static readonly string SOME_PLUGIN_DLL = "SomePluginName.dll";
...

    internal static readonly string[] temporaryDLLs = new string[]
    {
        CSHARP_DLL,
        MAGIC
    };

Note that a method called between the two (or more) assemblies can still be safely obfuscated.

Why should I use an obfuscator?

The .dll produced from compiling C# code is extremely easy to read and reverse engineer. It's almost equivalent to having access to the source code itself! Obfuscation leaves your source code unchanged but modifies the produced .dll making it illegible and considerably harder for someone to reverse engineer. Have a look at your code by using a tool like ILSpy on your Assembly-CSharp.dll

What makes your obfuscator different from others?

It's specially designed for use in the Unity software, and seamlessly integrates with the build process. These are its features:

  • Recognises Unity related code that must not be changed
  • Renames Classes (including MonoBehaviours)
  • Renames Methods
  • Renames Parameters
  • Renames Fields
  • Renames Properties
  • Renames Events
  • Removes Namespaces without any conflicts
  • String literal obfuscation
  • Adds fake methods
  • Easy customisation using the Unity® inspector window
  • Consistent name translations are possible across multiple builds and developers
  • Supports IL2CPP
  • Supports Unity Assembly Definition Files

Is this for Personal or Pro?

Both.

How easy is it to use?

It is designed to work out of the box. Once the package has been installed you can build your project as normal and a console message will appear to say it has been obfuscated. Configuration can be done through an asset in the Inspector window within the Unity® software.

Isn't encrypting the dll better than obfuscating it?

When encrypted dlls are decrypted (to run the game) the resultant code is the same as it was before encrypting, i.e. plain to read/reverse engineer. Obfuscation, however, is not reversed. For maximum protection, you'll want to both obfuscate and encrypt. Just be aware that encryption can mean longer load times while it decrypts and it's been shown to be relatively simple for a miscreant to grab the decrypted code while the game is running.

If someone sends me a crash report with a stack trace, how can I read it?

A nameTranslation.txt file can be created when you build your project that shows what new names were assigned. There is no automated translation tool provided, but it's possible to manually translate a stack trace using that file.

Which platforms can I target?

Supported platforms include: Standalone Windows 32&64 bit, Android®, iOS, WebGL. Other platforms are not guaranteed or supported but may become supported at a future date.

What about IL2CPP?

IL2CPP builds are by their nature much harder to reverse engineer. However, builds include a global-metadata.dat file containing strings and member information (class, method names etc). Obfuscation will apply to this file adding further security.

Which languages are obfuscated?

The Obfuscator targets DLLs rather than a specific language, but only C# is officially supported.

Which assemblies are obfuscated?

Assembly-CSharp.dll is obfuscated by default.

Is it possible to obfuscate other DLLs too?

Yes, it is possible to obfuscate any number of DLLs including those created by assembly definitions, and including assemblies that have been precompiled.

How can I keep my old settings when I upgrade to a new version?

The next time you build after upgrading to the latest version will result in a prompt asking whether you'd like to keep your old settings.

Where can I buy it?

Version History

2.0.3 - 23rd May 2018

  • Fixed a bug where the Options Inspector window would not save the 'enabled' or 'Obfuscate all assembly definition' checkboxes.
  • Relaxed the default options to only obfuscate Assembly-CSharp.dll instead of all assembly definitions. It is recommended to enable it when you're ready to increase obfuscation strength.

2.0.2 - 20th May 2018

  • [UWP] Implemented a workaround for a UnityException on build for the UWP build target.

2.0.1 - 13th May 2018

  • Fixed "dll was not found" errors for certain assembly definition files.

2.0.0 - 7th May 2018

  • New Documentation added in PDF format.
  • Assembly Definitions introduced in 2017.3 can now be automated into the build process.
  • New options added to automatically obfuscate all assembly definitions.
  • 'permanentDLLs' in Config.cs is now defined in the inspector options file under the heading 'compiledAssemblies' (synchronising with Unity's name in the CompilationPipeline).
  • 'temporaryDLLs' in Config.cs is now defined in the inspector options file under the heading 'assemblies' (synchronising with Unity's name in the CompilationPipeline).
  • extraAssemblyDirectories in Config.cs is now defined in the inspector options file.
  • Priority of nested "[System.Reflection.Obfuscation]/[Skip]/[SkipRename]/Skip Namespaces" etc is no longer undefined behaviour - instead priority is awarded to the deepest level.
  • Classes annotated with [System.Reflection.Obfuscation(ApplyToMembers=true)] (or [Skip]) will now also skip any nested classes.
  • New option to skip literal obfuscation on methods that have been skipped.
  • New option to apply literal obfuscation on all methods by default.
  • Public nested classes and nested enums are no longer obfuscated if the public checkbox is disabled for class obfuscation.
  • Fixed a "Fatal error in Unity CIL Linker" that could occur when running with 'development' enabled build targets.
  • Obfuscating MonoBehaviour class names is no longer considered an experimental feature.

1.26.0 - 23rd September 2017

  • New options to give other attributes the same effect as Beebyte specific attributes. i.e. you can configure [JsonProperty] to have the additional effect of [SkipRename].

1.25.2 - 16th September 2017

  • Added ChartboostSDK to the list of Skipped Namespaces in the default options to fix a problem with delegates not being called.

1.25.1 - 7th September 2017

  • Fixed a bug with methods that have the [RuntimeInitializeOnLoadMethod] attribute.

1.25.0 - 24th August 2017

  • Reduced the memory footprint within the Editor following obfuscation.

1.24.12 - 2nd August 2017

  • Fixed issues with Attributes that take an inner class as a parameter.

1.24.11 - 27th July 2017

  • Fixed issues with Attributes that take a class as a parameter.

1.24.10 - 16th July 2017

  • Fixed a bug where an enum in a parameter as a default value from a second assembly would cause a failed resolution exception on a CheckedResolve.

1.24.9 - 13th July 2017

  • Fixed a bug breaking inheritence checks when generic types were nested within other generic types.

1.24.8 - 22nd June 2017

  • Added some exclusion for messages sent to UnityEditor classes.
  • Fixed an Object reference exception that could sometimes occur when obfuscating literals.

1.24.7 - 17th June 2017

  • Small bug fixes.

1.24.6 - 1st May 2017

  • Some Unity reflection calls are now found when using chained and complex arguments.
  • Compatibility fixes when linking with newer .NET versions.

1.24.5 - 26th April 2017

  • Fixed some errors that occurred when building with the old legacy procedural naming policy.
  • The stacktrace for any Obfuscator errors is visible once again.

1.24.4 - 13th April 2017

  • Fixed a rare ArgumentException that could happen if two fields in the same class share the same name.
  • Improved the build process.

1.24.3 - 8th April 2017

  • Optimisation when obfuscating MonoBehaviour class names.
  • Hidden option to obfuscate Beebyte attributes. This can help resolve imported types being defined multiple times (external DLLs).

1.24.2 - 17th March 2017

  • Fixed a rare TypeLoadException.
  • Fixed a "redefinition of parameter" error in IL2CPP when a delegate's parameter names are inferred from default declaration i.e. delegate { .. } instead of an explicit delegate(bool a, bool b) { .. }.

1.24.1 - 12th February 2017

  • Fixed a bug where a coroutine invoked by name from a different class would fail to execute if the coroutine is not annotated with [SkipRename] or [ReplaceLiteralsWithName]. This also fixes coroutines launched from within coroutines.

1.24.0 - 27th January 2017

  • Multiple DLLs can be simultaneously obfuscated by declaring them within Config.cs (new file). Endpoints in the referenced DLL are updated in the calling DLL. This new feature is experimental and has no interface.
  • Fixed a TypeLoadException that happened when a class extending an external class implements a custom interface that declares one of the external methods and where the implementing class doesn't override it.
  • Optimisation.

1.23.9 - 17th November 2016

  • Optimisation - Method obfuscation is now really quick compared to previous lengthy times seen with some projects that focused heavily on reflection (mostly NGUI).
  • Extra information added to the progress bar for method obfusation.
  • Forcing obfuscation on serialized fields with [System.Reflection.Obfuscation(Exclude=false)] was sometimes being ignored.

1.23.8 - 3rd November 2016

  • Added option to include fake code method names to the nameTranslation file.
  • Added new Attribute to exclude fake code being created from particular methods or classes.
  • Custom attributes now have their string arguments searched for when considering [ReplaceLiteralsWithName].
  • Added hidden option to provide canonical names of attributes to be searched for strings that add to the array of method names to be treated as [ReplaceLiteralsWithName].
  • Fixed a compile NullReferenceException under certain conditions when cryptographic hashes are disabled.
  • Fixed an ArgumentException that could occur when obfuscating literals using the simplified non-RSA algorithm.

1.23.5 - 4th September 2016

  • Fixed an IL2CPP compile error.

1.23.3 - 17th August 2016

  • Fixed a "NotSupportedException: The invoked member is not supported in a dynamic module." exception when using dynamically created libraries.
  • Fixed an IL2CPP compile error when fake code tries to clone extern methods.

1.23.1 - 8th August 2016

  • Improvements to fake code generation.

1.23.0 - 27th July 2016

  • Experimental new option to obfuscate MonoBehaviour class names.
  • New option to supply method names that will automatically have [ReplaceLiteralsWithName] applied.
  • New option to strip namespaces from the build.
  • New defaults added for third party assets NGUI and UFPS.
  • Upgrading to a new version will now prompt whether to keep old settings or replace them (This happens when you build).
  • Updated the default ObfuscatorMenuExample.cs file to no longer leave a progress bar hovering after obfuscation.
  • Added hidden options includeParametersOnPublicMethods and includeParametersOnProtectedMethods, set to true by default.

1.21.2 - 16th June 2016

  • New option to skip Enum constants (Useful shortcut if your enums often rely on ToString() as an alternative to using [Skip]).
  • Obfuscating now updates the build progress bar.
  • Added default configuration for Photon Networking compatibility.
  • Fixed a bug where obfuscation times could be extremely long when using Fake Code generation and when huge methods exist in the code.
  • Fixed missing scripts exceptions in WebPlayer builds that occurred when using Fake Code generation on methods that declare default arguments.

1.18.4 - 3rd June 2016

  • Classes annotated with [System.Reflection.Obfuscation(Exclude=false)] will now be obfuscated even if its namespace is explicitly skipped in Options.
  • Fixed a bug where iOS builds could fail to compile in Xcode® when using the default string literal obfuscation method (options.useSimplifiedObfuscateLiterals=true provides a temporary fix before this release).
  • Fixed a bug with string literal obfuscation where a string of length greater than 1/8th the chosen RSA key length would appear garbled.

1.18.1 - 23rd May 2016

  • Optimisation.
  • New default option to derive obfuscated names from a cryptographically generated hash. This means names will be consistent throughout a project's lifecycle, removing the need to maintain up to date nameTranslation.txt files.
  • New attribute [ObfuscateLiterals] for methods that instructs all string literals within it to be obfuscated, without requiring delimiters within the literals.
  • New option to toggle whether attributes should be cloned for fake methods.
  • New "Preserve Prefixes" section that can keep part of a name, i.e. OnMessage_Victory() => OnMessage_yzqor(). This is mostly for the reflection used by Opsive's UFPS asset.
  • New default option to reverse the line order of the nameTranslation.txt.
  • New option to surround every obfuscated name with a specified delimiter.
  • Parameter obfuscation is now included in the nameTranslation.txt.
  • Fixed an ArgumentOutOfRangeException that could occur when the minimum number of fake methods is set to a large value.

1.16.2 - 1st April 2016

  • ScriptableObject classes are now treated as Serializable by default (i.e. fields and properties are not renamed). This can be overriden by setting options.treatScriptableObjectsAsSerializable to false, or on a case-by-case basis by making use of [System.Reflection.Obfuscation] on each field, or [System.Reflection.Obfuscation(Exclude = false, ApplyToMembers = true)] on the class.
  • Fixed a TypeLoadException for methods such as public abstract T Method() where a deriving class creates a method replacing the generic placeholder, i.e. public override int Method().
  • Added hidden option for classes to inherit Beebyte attributes Skip and SkipRename that are on an ancestor class. To use, set options.inheritBeebyteAttributes = true prior to obfuscation.

1.16.0 - 10th March 2016

  • Added an option to obfuscate Unity reflection methods instead of simply skipping them. In time this will become the default.
  • Methods replacing string literals that share the same name now also share the same obfuscated name, so that replaced literals correctly point to their intended method.
  • Faster obfuscation time for methods.
  • Fixed a TypeLoadException.
  • The name translation file now has a consistent order.

1.15.0 - 25th February 2016

  • Added option to search SkipNamespaces recursively (this was the default behaviour)
  • Added option to restrict obfuscation to user-specified Namespaces.
  • Added a master "enabled" option to easily turn obfuscation on/off through scripts or the GUI.
  • Add Fake Code is now available for WebPlayer builds.
  • Added option to include skipped classes and namespaces when searching for string literal replacement via [ReplaceLiteralsWithName] or through the RPC option.
  • Fixed a bug where classes within skipped namespaces could sometimes have their references broken if they link to obfuscated classes.
  • Fixed a NullReferenceException that could sometimes (very rarely but consistently) occur during the write process.
  • Future-proofing against errors that would otherwise occur if a new version of Mono.Cecil is shipped with Unity.
  • Fixed a "UnityException: Failed assemblies stripper" exception that occurs when selecting both fake code and player preference stripping levels.
  • Improvements to Fake Code generation.

1.12.0 - 12th February 2016

  • Added finer control to exclude public or protected classes, methods, properties, fields, events from being renamed.
  • Fixed a bug in the Options inspector that could revert some changes after an option's array's size is altered.

1.11.0 - 3rd February 2016

  • Added an option to specify annotations that should be treated in the same way as [RPC], to cater for third party RPC solutions.

1.10.0 - 28th January 2016

  • Previous obfuscation mappings can now be reused.
  • Unity Networking compatibility (old & new).
  • [RPC] annotated methods are no longer renamed unless an explicit [Rename("newName")] attribute is added, or if an option is enabled.
  • A new [ReplaceLiteralsWithName] attribute exists that can be applied to classes, methods, properties, fields, and events. It should be used with caution since it searches every string literal in the entire assembly replacing any instance of the old name with the obfuscated name. This is useful for certain situations such as replacing the parameters in nView.RPC("MyRPCMethod",..) method calls. It may also be useful for reflection, but note that only exact strings are replaced.

1.9.0 - 23rd January 2016

  • Added a new option "Skip Classes" that is equivalent to annotating a class with [Skip]. It's a good long-term solution for 3rd party assets that place files outside of a Plugin directory in the default namespace.
  • Added a way to resolve any future AssemblyResolutionExceptions via the Postscript.cs file without requiring a bespoke fix from Beebyte.
  • Fixed a bug in Postscript.cs for Unity 4.7
  • Added a workaround for an unusual Unity bug where the strings within the Options asset would sometimes be turned into hexadecimals, most noticable when swapping build targets often.

1.8.4 - 7th January 2016

  • Fixed an AssemblyResolutionException for UnityEngine that could sometimes happen during the Write process.
  • Various rare fixes for generics.
  • Properties can now be assigned Obfuscation attributes such as [Rename], etc.

1.8.1 - 1st January 2016

  • Various fixes for generics.
  • Fixed an AssemblyResolutionException for UnityEngine.UI when using interfaces from that assembly. This also fixes other extension Unity assemblies that have issues resolving.
  • Feature - Properties can be be obfuscated.

1.7.3 - 29th December 2015

  • Fixed TypeLoadException errors.
  • Fixed a "Script behaviour has a different serialization layout when loading." error.
  • Undocumented fix.
  • Private Fields marked with the [SerializeField] attribute are now preserved by default.

1.7.0.1 - 14th December 2015

  • Unity® 5.3 compatibility.

1.7.0 - 11th December 2015

  • Improved the "Works first time" experience by searching for reflection methods referenced by certain Unity® methods such as StartCoroutine. New option added to disable this feature.
  • WebPlayer support (string literal obfuscation, public field obfuscation, fake code are disabled for WebPlayer builds).
  • Added an option to strip string literal obfuscation markers from strings when choosing not to use string literal obfuscation.
  • ObfuscatorMenuExample.cs added showing how you can Obfuscate other dlls from within Unity®.
  • Added protection against accidently obfuscating the same dll multiple times.
  • Added an advanced option to skip rename of public MonoBehaviour fields.

1.6.1 - 16th November 2015

  • First public release.