Skip to content

Instantly share code, notes, and snippets.

@grimmdev
Last active August 29, 2015 14:21
Show Gist options
  • Save grimmdev/7c57766b56a255cde6f3 to your computer and use it in GitHub Desktop.
Save grimmdev/7c57766b56a255cde6f3 to your computer and use it in GitHub Desktop.
Server Side Scripting (JS Only)
print('Loaded from web baby!');
// put this on your server host, preferably in a publically accessable location to which it can be loaded, then add it to the script.
#pragma strict
var url = "url to script";
function Start () {
// Start a download of the given URL
var www : WWW = new WWW (url);
// Wait for download to complete
yield www;
// check and eval the script
Debug.Log(www.text);
eval(www.text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment