Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question Stop people from stealing code.

Discussion in 'Editor & General Support' started by callumdisney, Jun 9, 2020.

  1. callumdisney

    callumdisney

    Joined:
    Jun 18, 2019
    Posts:
    1
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,960
    The only way to stop people from decompiling your code would be to not publish your game.

    What is the worry with people "stealing" your code though? What are you afraid they will do with it?
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The linked answer is for a build using Mono. Use IL2CPP if available for your target platform and the process of getting back to your original code will be considerably more difficult (not impossible, but there aren't any script kiddie tools to do it either).

    The difference is using Mono your C# code is compiled to IL instead of machine code. This is the normal way C# has been compiled since the language was first created. IL is converted to machine code at runtime instead of during the build process. IL is trivial to convert back to C# with the correct tools.

    IL2CPP by contrast goes further and converts the IL into C++ and then compiles the C++ code to machine code. So no IL is handed out with your IL2CPP build. Machine code is considerably more difficult to convert back to C# compared to IL.
     
    Last edited: Jun 9, 2020
    jasonatkaruna likes this.