Convert editor C# code via IL2CPP and re-integrate as native Plugin?

2018.1 adds support for IL2CPP scripting backend for windows and macOS standalone.

I wonder if it’s now possible to use IL2CPP as “protection” for editor plugins. “Protection” in the sense that you can’t load the native DLL into Reflector and look at the C# code.

Is it possible to convert C# editor extensions via IL2CPP to a native DLL and re-integrate that DLL as a native Plugin in the editor? For the user of that editor plugin it should behave exactly the same, whether the extension is stored as a .NET assembly or native Plugin.

Thoughts?

This is not possible. The editor only runs with the Mono scripting backend, as it requires a JIT compiler. IL2CPP is only an AOT compiler, so it won’t work with the editor.

In general, IL2CPP is not designed to obfuscate code. Since it generates native machine code, it is more difficult to reverse engineer than managed assemblies, but the obfuscation aspect is not something we support. It is a side-effect only.

1 Like

Thank you for the reply!

Besides, if you put in some effort, you can get original class/method/field names, field values and even disassembly for the functions. IL2CPP is not DRM.