public LuaScript(LuaContext context, string scriptString) { this.context = context; string fullScript = "return function()\n" + scriptString + "\nend"; scriptRoutine = context.CreateScript(fullScript); }
public LuaScript(LuaContext context, string scriptString) { this.context = context; string fullScript = "return function()\n" + scriptString + "\nend"; scriptRoutine = context.CreateScript(fullScript); name = scriptString.Substring(0, Mathf.Min(80, scriptString.Length)); }