Protecting Unity Player Files from Being Ganked

What do folks do to protect their .unity3d files from getting downloaded off their web page instead of being played ON their web page through the web player?

For example:

  • You make a game.
  • You put it on the web.
  • You give people the address to play it.
  • You are fine with them playing it there, you just don’t want them downloading the files and being able to play it offline or (even worse) distribute it.
  • You definitely don’t want them downloading the file and potentially decompiling it or something like that to get your code.

4: check the absolute url on start of the game, if it is not the url of your domain, just load an empty scene.
5: Impossible to totally prevent and can break º4. What you can do is encrypt the url string and obfuscate your game, that will stop most crackers, but if an engineer really wants your stuff, he gonna get it.

Great suggestion. Seems pretty simple. Do you have a suggested/preferred way you code this?

You mean encrypt where it is going to load the .unity3d file?

Ultimately this won’t help much, since there are tons of add ons that can download it right from the browser cache/memory. Unless I am misunderstanding you.

I figured that I probably need to build whatever protection I want directly into the .unity3d file. I have to assume they will figure out a way to download it. I just need to make it not run unless its on our site.

Or am I wrong?

http://docs.unity3d.com/Documentation/ScriptReference/Application-absoluteURL.html