void OnGUI()
{
text = GUI.TextArea(new Rect(0, 0, width, windowHeight), text);
PlayerPrefs.SetString("__Text", text);
if (GUI.Button(new Rect(0, windowHeight, width, 90), "RunScript (" + Script.Version + ")")) {
output = "";
Script script = new Script();
try {
script.LoadLibrary();
script.PushAssembly(GetType().Assembly);
script.PushAssembly(typeof(GameObject).Assembly);
script.SetObject("print", script.CreateFunction(new ScriptPrint()));
ScriptObject ret = script.LoadString(text);
OutPut("ReturnValue : " + ret);
} catch (System.Exception e) {
OutPut("StackInfo : " + script.GetStackInfo());
OutPut(e.ToString());
}
}
GUI.TextArea(new Rect(0, windowHeight + 90, width, windowHeight), output);
}
private void OnLogCallback(string condition, string stackTrace, LogType type) {