Generating concealed code

Good day good folks,

After creating some cool tools and editor add-on and algorithm classes in C# I would like to compile and conceal some of the more complicated IP classes and release it to be tested.

I cannot find out how to do that and obviously I would not want to write the code native and compile for each platform.
What is the way to go on that (to write classes that only reveal their declarations / methods)?

Grand thanks

I’m not sure if there’s a specific meaning to “concealed code”, of which I’m unaware, but if you’re talking about the general case of trying to protect code from decompilation/reverse-engineering: simply put, you can’t.

.NET code, by the very manner in which it is implemented, is pretty trivial to decompile through reflection, and there are several well-known popular products that will extract the source code from a compiled DLL. This is not specific to Unity, but to all software. You can attempt to obfuscate it, but that often carries its own set of risks, from hindering performance to downright breaking your code (obfuscation often involves changing method/variable names at compile-time, and given that much Unity code requires method hooks to have a particular naming convention, this can make it very fragile).

Best protection is simply to have a well-written software licence that prohibits reverse-engineering, and keep on innovating so that any decompiled versions are always one step behind you.