We are preparing a working environment(Workspace) in Unity3d that contains several assets, settings, and scripts. The problem is that we want to protect our assets. How is it possible? I know that settings or models are not protectable. But how do I protect my code in a way that the client can use it but not see it?

  • \$\begingroup\$ I would not know any good technical way to do this. My approach to this problem would be to have our lawyer write a really scary sounding NDA / license and demand that the people who receive those templates sign it. \$\endgroup\$ – Philipp Jun 21 at 11:36
  • \$\begingroup\$ This is unlikely to be possible. The managed C# that Unity uses is pretty easy to decompile to readable source, even if you distribute it as a pre-compiled library. I think you should give up on code secrecy as a goal, and find another route to serve your business needs, like the legal approach that Philipp recommends. \$\endgroup\$ – DMGregory Jun 21 at 14:21
  • \$\begingroup\$ converting your code to simple DLL is not an option? easily decompile? \$\endgroup\$ – Muhammad Faizan Khan Jun 22 at 6:16
  • \$\begingroup\$ If there's a particular piece if code you're worried about, you could essentially make that its own application that your Unity scripts communicate with via TCP or some other interface. That has a lot of drawbacks, however, and won't work for anything performance critical, so I hesitate to make that an answer. \$\endgroup\$ – Ruther Rendommeleigh Jun 22 at 12:46
  • \$\begingroup\$ most of the script i want to protect. initially, i am trying to convert my scripts to DLL. But above comment suggested that dlls are easily decompiled. \$\endgroup\$ – Muhammad Faizan Khan Jun 23 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.