2
\$\begingroup\$

I am trying to create a plugin that can be uploaded into the unity asset store.I do not want the users to be able to edit the content.Functions should not be editable,just the variables should be editable.Is that possible? Or it would be still better if i could just hide the entire script.Any suggestions please ?The scripts are to be attached to the gameobject that will be active in the scene. Thanks

\$\endgroup\$
5
\$\begingroup\$

Anything that ends up on the user's computer in some form is going to be editable by that user. It's simply a matter of how difficult it would be.

You can choose a method of packaging your content that makes it harder to trivially inspect and modify it (see this related question but you won't be able to completely protect against a dedicated user modifying this data.

Your best bet is to do something simple to protect against casual hacking (the way Unity assets are bundled and supplied to an end-user may already be sufficient for this), indicate in your license agreement for the asset that you cannot modify the core content but can only "change the variables" you've exposed, and be done with it. Anything more will quickly run you into a case of diminishing returns.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It's worth mentioning that if I buy a Unity plugin, it's usually exactly because I can inspect and modify it to suit my needs, and because I can fix all the bugs it comes with. So code obfuscation attempts would negatively affect the rating. \$\endgroup\$
    – Peter
    Aug 10 '16 at 17:16
  • 2
    \$\begingroup\$ If the worry is people stealing your code, the answer is in liscencing. There are scummy people who ignore that, but they tend to be small timers who eventually go down in flames anyway from what I understand. \$\endgroup\$
    – StarWeaver
    Aug 10 '16 at 19:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.