{"assets":[],"author_link":"author\/lucasncv\/","author_name":"lightspeedlucas","cat":"LD #35","categories":["LD #35"],"comments":[],"epoch":1461186300,"event":"LD35","likes":20,"metadata":{"p_key":"85141","p_author":"lightspeedlucas","p_authorkey":"0","p_urlkey":"295901","p_title":"Protecting Unity Web builds","p_cat":"LD #35","p_event":"LD35","p_time":"1461186300","p_likes":"20","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1460678400","event_key":"33","event_name":"LD35"},"source_url":"2016\/04\/20\/protecting-unity-web-builds\/","text":"<div class=\"wp-caption aligncenter\" style=\"width: 202px\"><a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-35\/?action=preview&amp;uid=10289\"><img class=\"\" height=\"192\" src=\"http:\/\/lucasnev.es\/fluble\/img\/fluble.gif\" width=\"192\"\/><\/a><p class=\"wp-caption-text\">not this time, thiefs!<\/p><\/div>\n<p>Hello! The last time I was in a Ludum Dare my game was a little bit stolen by one of those browser games websites and to this day it\u2019s still there, without my permission. This time I took some precautions! I want to share a very simple way to do it, in case it\u2019s of interest to anyone.<span id=\"more-557510\"><\/span><\/p>\n<p>The idea is to check the URL of the page the game is running on and then, if it\u2019s not something you know and approve of, disable the game in some way. <a href=\"http:\/\/pastebin.com\/TEMrJ79j\" target=\"_blank\">Here\u2019s a bit of C# code that does exactly that<\/a>. Don\u2019t forget to check for ludumdare.com if you embed your game here. If you need me to explain the code with more details or have suggestions on how to improve it, let me know!<\/p>\n<p>Oh, by the way, if the host turns out to be unknown, I wouldn\u2019t just disable the game right away, but instead put a message after the title screen or the first level directing the user to your website or something like that. This way if the pesky thief doesn\u2019t go far enough to see it, they will just generate free traffic for you! The tables have turned ( \u0361\u00b0 \u035c\u0296 \u0361\u00b0)<\/p>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/unity\/\" rel=\"tag\">unity<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/web\/\" rel=\"tag\">web<\/a><\/p>","time":"April 20th, 2016 9:05 pm","title":"Protecting Unity Web builds","title_was_empty":false}