Skip to content

Instantly share code, notes, and snippets.

@hiepnd
Created August 17, 2016 02:18
Show Gist options
  • Save hiepnd/2c0b99c90bdbdcb589df4e75795fc448 to your computer and use it in GitHub Desktop.
Save hiepnd/2c0b99c90bdbdcb589df4e75795fc448 to your computer and use it in GitHub Desktop.
#pragma strict
import UnityEngine.UI;
import UnityEngine;
public var code:String = "// Type your JS code here\n// Predefined variables:\n// _S: this component\n// _GO: this game object\n\nprint('Hello world');\n\n";
function Eval(str:String) {
var _GO = this.gameObject;
var _S = this;
var _T = this.transform;
eval(str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment