Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

CodeGuard (Obfsucation and code protector editor extension)

Discussion in 'Assets and Asset Store' started by Apshai-Arts, May 22, 2013.

  1. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    OK I worked on using this all day and it's a cool product. However if you are using lots of polymorphism in your c# code you will run into real bad bugs after obfuscating.

    If you are using any virtual methods and overriding it in child classes, you will get intermittent problems where some builds, the child instance will end up calling the parent logic. I think it's due to the child class's overriden method being renamed to a different name than the virtual parent method. This happened to me on a Christmas Eve release, which really ticked me off. I'm still trying to recover from this.

    Hopefully this can be fixed. This would be a great product when the problems are ironed out!
     
  2. vitaly

    vitaly

    Joined:
    Oct 12, 2012
    Posts:
    10
    Im using polymorphism and wanted to use this product. Now I don't know...
     
  3. NestorAlgieri

    NestorAlgieri

    Joined:
    Sep 11, 2011
    Posts:
    299
    P.s. you will get no support. Too bad the dev got hurt. It had so much potential.
     
  4. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Wow, I am really sad to hear about this accident. I hope you get better and feel well soon. I think I was the first person to buy CodeGuard, as I was asking for it before it was even released on the Asset Store. I've loved it and while it isn't perfect, the fact it can moderately obfuscate web player builds was the whole reason I wanted it. Haven't regretted it one bit.

    To anyone having problems, try skipping any plugins (tk2d* for 2DToolKit, NGUI, etc.) as often they won't get obfuscated correctly. Beyond that, it's trial and error. I have it working, had to skip a few static items here and there.

    As for how do you verify this has been obfuscated? It works. If you want to delve into how to decompile code, go for it, and you'll see it's there. It only changes the compiled code, not the code in the Unity Editor / Mono / Etc. (someone asked this a while back.)

    Considering my next option was a $800 license from where-ever it was... which doesn't work with the webplayer... I'm still very happy with this purchase. Hope the dev recovers. Awful to hear about.
     
  5. clever

    clever

    Joined:
    Oct 11, 2012
    Posts:
    37
    Is there a way the obfuscator can be set to Exclude everything by default? this way I can obfuscate only the code I want
    My game uses a bunch of add-on scripts (like Json...etc) and they break when I use CodeGuard to obfuscate (even at a very low setting)

    thanks
     
  6. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412
    @ApshaiArts how are you doing? Have you recovered from your injury? Will you continue to work on this product?
    Thanks
     
  7. TriplePAF

    TriplePAF

    Joined:
    Aug 19, 2009
    Posts:
    246
    The codeguard gives on Unity 4.5 the following error message:

    DirectoryNotFoundException: Directory '/Applications/Unity/Unity.app/Contents/PlaybackEngines/iphoneplayer/Managed' not found.
    System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:514)
    System.IO.Directory.GetFiles (System.String path, System.String searchPattern) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:308)
    CodeGuard.DoCodeGuardiOSBuild () (at Assets/Apshai Arts/CodeGuard/Editor/CodeGuard.cs:1130)
    CodeGuard.MidCodeGuarding () (at Assets/Apshai Arts/CodeGuard/Editor/CodeGuard.cs:1278)
    UnityEditor.HostView:OnGUI()

    Please fix it. :)


    Peter.
     
  8. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    97
    Hi !

    Today I purchased CodeGuard and encountered some problems with it.

    Is this project alive and supported ?

     
  9. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    No the project is dead and I don't think it even works in 4.5 judging by the errors people have reported.
    I'd just request a refund from Unity.
     
  10. WhiteDev

    WhiteDev

    Joined:
    Jul 3, 2013
    Posts:
    31

    Change code in this plugin to fix the problem.

    The file "CodeGuard.cs" at /Assets/Apshai Arts/CodeGuard/Editor

    at line 822:
    Original: enginePath=Path.Combine(enginePath,"iphoneplayer");
    Modified: enginePath=Path.Combine(enginePath,"iOSSupport");

    at line 1121:
    Original: enginePath=Path.Combine(enginePath,"iphoneplayer");
    Modified: enginePath=Path.Combine(enginePath,"iOSSupport");

    I hope it will work fine:)
     
  11. TriplePAF

    TriplePAF

    Joined:
    Aug 19, 2009
    Posts:
    246
    The above settings are fixing the problem. I also did a little check with reflector and the encryption is in place.

    Thanks,

    Peter.
     
    Last edited: Jun 18, 2014
  12. c6u2

    c6u2

    Joined:
    Nov 15, 2013
    Posts:
    31
    Hi Apshai Arts,
    What the menu "window/codeguard/guard unity project assemblies" use for?
     
  13. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    Is there a demo we can test? I don't seem to find any threads regarding CodeEncipher or any forum discussions (all I could find was the same message on 9 other threads posted today). Has anyone tried this tool and can give a comparison between this and other tools such as Crypto Obfuscator (external tool). Also could you give an example of performance changes with encryption vs obfuscation and why your solution is better compared to the other tools?

    Thanks,
    Sam
     
    longkeng likes this.
  14. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    I had just purchased yours plugin on assets store.
    http://u3d.as/4Le
    If i build apk file with choice custom method and proxy custom method, IENumerator method not working.
    I used StartCoroutine(IENumerator routine) instead of StartCoroutine(String method, object value), but at yield return null always have "NullReferenceException: Object reference not set to an instance of an object" error.
    Wait for reply! Thanks and best regards!
     
    Last edited: Mar 18, 2015
  15. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    this asset work with Unity 5 and Android?

    Regards
     
  16. SantaKlaus

    SantaKlaus

    Joined:
    Mar 3, 2013
    Posts:
    11
    Hey Apshai Arts,
    how are you doing?
    It would be great to have a comment on whether you are still able/up to continuing CodeGuard, or if not, whether there is a plan to pass the product on to other developers. Or maybe you already have and I just missed that info.

    Anyway I hope that your health is restored 100% since your accident and you are doing fine.

    Greatful for any statements,
     
  17. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Hi,

    Is this tool still supported ? Will there be any update anymore ?
     
  18. krowal

    krowal

    Joined:
    Oct 7, 2014
    Posts:
    1
    Hey, there is one thing which bothers me. Is it possible to read stacktrace produced by application which code is obfuscated by CodeGuard? For example when we want to have a feedback from users using mobile IOS application during runtime errors/crashes.

    Does it produce some "map-file" to reproduce stacktrace to readable form?
     
  19. Delenyin

    Delenyin

    Joined:
    Jul 27, 2015
    Posts:
    1
    Because of the way Unity handles the source code, the most obvious way to go is to replace the original code with the obfuscated one, so: What happens to the original code?... how do you recover it?... how can you edit it again?
     
  20. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    126
    I have an issue while trying to ofuscate my game. Im using DOTween and, when Code Guard tries to ofuscate it, I get an error. Can I setup CodeGuard to NOT ofuscate DotTween? Or to ofuscate certains scripts and not all of them? Documentation is poor and I cant get it done