Created
May 14, 2015 03:18
-
-
Save grimmdev/3aa425ccf55f84ced05a to your computer and use it in GitHub Desktop.
Sitelock Unity3D Web Player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You'll have to call these functions atleast once, on load of the game just to ensure your work isn't being stolen. | |
using UnityEngine; | |
using System.Collections; | |
public class SiteLock { | |
public static void WWWLock (string Domain) { | |
Application.ExternalEval("if(document.location.host != '" + Domain + "') { document.location='" + Domain + "'; }"); | |
} | |
public static void WWWLock (string Domain, string Redirect) { | |
Application.ExternalEval("if(document.location.host != '" + Domain + "') { document.location='" + Redirect + "'; }"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment