Code Protection

Does PlayCanvas implement any kind of security feature for protecting javascript code?

Not currently. If you download and self host your game, you can run your scripts through whatever obfuscator/minifier you like (such as Google Closure Compiler). If you publish to though, you cannot do this. I have added a feature request about this. By default, PlayCanvas should really concatenate your scripts and minify/obfuscate them on export.

I think it would be ideal if there was a obfuscator/minifier optional checkbox if for some reason you need access to the code for debugging purposes.

Yeah, I agree. Not everybody will want to obfuscate.

Did this ever get added? It would be a very useful feature to have.

Yep. By default, your published apps now have minified/obfuscated code.

1 Like

That’s great news Will!