Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Is IL2CPP a valid way to obfuscate code?

Discussion in 'Scripting' started by indieDoroid, May 5, 2019.

  1. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    146
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    6,500
    I usually don't even bother with obfuscation in the first place...

    But for il2cpp, I wouldn't even bother. I mean the entire point of il2cpp is that it converts IL to C++ and then compileds that to machine code. It's no longer a jit compiled intermediate language, it's straight up machine code for the platform it's compiled for.

    I mean sure, there may be separate files within the unity installation package that may list many of the methods/strings by name. But it's not really enough to do a whole lot with.

    Personally I'd be more worried about other aspects of my game, like marketing, gameplay, etc before obfucsating code that is getting ran through il2cpp.
     
  3. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,383
    It'll definitely be harder than a managed optimized assembly.
    Honestly though, most of the time developers care too much about obfuscation.

    Most of the time it doesn't make sense to steal the complete source code of an application, and if algorithms are "stolen", well... most of the time they're no ground-breaking algorithms and other developers have already implemented the same, similar or even better algorithms.

    With all respect for the efforts put into that asset, holy ...
    A quick look at that screenshot and the videos were enough... Byte array allocation each frame for string literals which then have to be "decrypted"? I'm not an extreme no-gc-enthusiast, and yes, it's generally not recommended to put stuff like quest texts and other UI texts into source code, but that's definitely a potential risk of wasting performance in a very uncontrolled manner.
     
    Last edited: May 5, 2019
    indieDoroid and lordofduct like this.
  4. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    146
    Off topic, but your games look great ! :D
     
    lordofduct likes this.