Obfuscator_Readme.txt 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. Obfuscator Copyright (c) 2017-2019 OrangePearSoftware. All Rights Reserved
  2. Usage
  3. =====
  4. OrangePearSoftwares Obfuscator is developed to increase software and game security especially for
  5. games build with Unity3d. It feature is to obfuscated built dotNet assemblies, like
  6. assembly-csharp and assembly-unityscript for the Platforms Windows/Mac/Linux Stan-
  7. dalone, the embedded Platform Android and IPhone and consoles.
  8. Obfuscator Free considers specific Unity features, like MonoBehaviour, NetworkBe-
  9. haviours, Serialization, Refl
  10. ection, and so on, to allow a easy and out of the box working
  11. obfuscator. Obfuscator features reachs from simple renaming:
  12. - Classes
  13. - Fields
  14. - Propertys
  15. - Events
  16. - Methods
  17. Up to Method content obfuscation.
  18. With the Pro Version you have access to:
  19. - Assembly Definition File Obfuscation.
  20. - External Dll obfuscation.
  21. - MonoBehaviour/NetworkBehaviour/ScriptAbleObject obfuscation.
  22. - String obfuscation.
  23. - Protect classes against refactoring!
  24. - And many more features!
  25. Options
  26. =======
  27. From within Unity, select "Window->Obfuscator Setting".
  28. From the Inspector window, you can now see the Obfuscation options available along with descriptions where relevant. The default settings provide a solid configuration that obfuscates the majority of your code, but here you have general control over what is obfuscated.
  29. Code Attributes
  30. ===============
  31. Methods often need to be left unobfuscated so that they can be referenced from an external plugin via reflection, or for some other reason. Or maybe you just want a field called "password" to appear as "versionId" when viewed by a decompiler.
  32. You can achieve this by adding Attributes to your code.
  33. The following OrangePearSoftware specific attributes are supported:
  34. [DoNotRenameAttribute] - The obfuscator will not rename this class/method/field, but will continue to obfuscate its contents (if relevant).
  35. [DoNotObfuscateClassAttribute] - The obfuscator will not rename this class, nor will it obfuscate its contents (fields/methods/...).
  36. [DoNotObfuscateMethodBodyAttribute] - The obfuscator will not rename content in the specific method.
  37. [DoNotUseClassForFakeCodeAttribute] - Add this to an Class, to disallow fake code adding! Or to disallow using this class to create new fake classes basing on it!
  38. [DoNotMakeClassUnDecompileAbleAttribute] - Add this to an Class, to disallow making it unreadable by dissassembler!
  39. Troubleshooting F.A.Q
  40. =====================
  41. Q. After obfuscating, my 3rd party plugin has stopped working!
  42. A. The simplest way to fix this is to look at the plugin's script to see what namespace they use. Then, in the inspector window in "OPS->Obfuscator Settings" there is an array called "Skip Namespaces". Add the plugin's namespace to this array and the obfuscator will ignore any matching namespaces. Occassionally a plugin will forget to use namespaces for its scripts, in which case you have to : Annotate each class with [OPS.Obfuscator.Attribute.DoNotObfuscateClassAttribute].
  43. Q. Button clicks don't work anymore!
  44. A. Check your Options and see if you enabled the "public methods". If you did, then make sure you've added a [Obfuscator.Attribute.DoNotRenameAttribute] attribute to the button click method.
  45. For a more obfuscated approach you could assign button clicks programatically. For example, here the ButtonMethod can be obfuscated:
  46. public Button mybutton;
  47. public void Start()
  48. {
  49. mybutton.onClick.AddListener(ButtonMethod);
  50. }
  51. The same process works for all gui methods.
  52. But mostly if you check in the inspector window in "OPS->Obfuscator Settings": Find Gui Methods, it will find many to all!
  53. Q. Animation events don't work anymore!
  54. A. See "Button clicks don't work anymore!". If a method is being typed into the inspector, you should exclude it from Obfuscation.
  55. Here works also: if you check in the inspector window in "OPS->Obfuscator Settings": Find Animation Methods, it will find many to all!
  56. Q. It's not working for a certain platform.
  57. A. Regardless of the platform, send us an email (orangepearsoftware@gmail.com) with the error and we'll see what we can do.
  58. Q. How can we run obfuscation later in the build process?
  59. A. You can control this in the Assets/ObfuscatorPro/Editor/BuildPostProcessor.cs script. The PostProcessScene attribute on the Obfuscate method has an index number that you can freely change to enable other scripts to be called first.
  60. Q. Can I obfuscate externally created DLLs?
  61. A. Yes, with Obfuscator Pro you can enter under: OPS->Obfuscator Settings->General Assemblies.
  62. Q. How do I obfuscate local variables?
  63. A. Local variable names are not stored anywhere, so there is nothing to obfuscate. A decompiler tries to guess a local variable's name based on the name of its class, or the method that instantiated it.
  64. Q. When I build with Jenkins there is an error: Asset obfuscating finished with ERRORS!
  65. A. When calling BuildPlayer by yourself, through Jenkins for example, some Unity intern events will not get called. So you have to call it yourself.
  66. Obfuscator.BuildPostProcessor.ManualRestoreUnityObjects();
  67. BuildPlayer(....)
  68. Obfuscator.BuildPostProcessor.ManualRestoreUnityObjects();
  69. Q. Something's still not working, how can I get in touch with you?
  70. A. Please email us at orangepearsoftware@gmail.com giving as much information about the problem as possible.