Esempio n. 1
0
    public LuaScript(LuaContext context, string scriptString)
    {
        this.context = context;

        string fullScript = "return function()\n" + scriptString + "\nend";

        scriptRoutine = context.CreateScript(fullScript);
    }
Esempio n. 2
0
    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));
    }