Inheritance: MonoBehaviour
 private void Awake()
 {
     Application.logMessageReceived += new Application.LogCallback(this.ShowTips);
     TestLuaStack.Instance           = this;
     new LuaResLoader();
     TestLuaStack.testGo = base.gameObject;
     this.state          = new LuaState();
     this.state.Start();
     LuaBinder.Bind(this.state);
     this.state.BeginModule(null);
     this.state.RegFunction("TestArgError", new LuaCSFunction(TestLuaStack.TestArgError));
     this.state.RegFunction("TestTableInCo", new LuaCSFunction(TestLuaStack.TestTableInCo));
     this.state.RegFunction("TestCycle", new LuaCSFunction(TestLuaStack.TestCycle));
     this.state.RegFunction("TestNull", new LuaCSFunction(TestLuaStack.TestNull));
     this.state.RegFunction("TestAddComponent", new LuaCSFunction(TestLuaStack.TestAddComponent));
     this.state.RegFunction("TestOutOfBound", new LuaCSFunction(TestLuaStack.TestOutOfBound));
     this.state.RegFunction("TestMulStack", new LuaCSFunction(TestLuaStack.TestMulStack));
     this.state.BeginStaticLibs("TestStack");
     this.state.RegFunction("Test1", new LuaCSFunction(TestLuaStack.Test1));
     this.state.RegFunction("PushLuaError", new LuaCSFunction(TestLuaStack.PushLuaError));
     this.state.RegFunction("Test3", new LuaCSFunction(TestLuaStack.Test3));
     this.state.RegFunction("Test4", new LuaCSFunction(TestLuaStack.Test4));
     this.state.RegFunction("Test5", new LuaCSFunction(TestLuaStack.Test5));
     this.state.RegFunction("Test6", new LuaCSFunction(TestLuaStack.Test6));
     this.state.EndStaticLibs();
     this.state.EndModule();
     this.state.Require("TestErrorStack");
     TestLuaStack.show         = this.state.GetFunction("Show", true);
     TestLuaStack.testRay      = this.state.GetFunction("TestRay", true);
     TestLuaStack.showStack    = this.state.GetFunction("ShowStack", true);
     TestLuaStack.test4        = this.state.GetFunction("Test4", true);
     TestLuaStack.TestDelegate = (Action)Delegate.Combine(TestLuaStack.TestDelegate, new Action(this.TestD1));
     TestLuaStack.TestDelegate = (Action)Delegate.Combine(TestLuaStack.TestDelegate, new Action(this.TestD2));
 }
    private static int TestMulStack(IntPtr L)
    {
        int result;

        try
        {
            TestLuaStack.TestMul0();
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
    void Awake()
    {
#if UNITY_4_6 || UNITY_4_7
        Application.RegisterLogCallback(ShowTips);
#else
        Application.logMessageReceived += ShowTips;
#endif
        Instance = this;
        new LuaResLoader();
        testGo = gameObject;
        state  = new LuaState();
        state.Start();
        LuaBinder.Bind(state);

        state.BeginModule(null);
        state.RegFunction("TestArgError", TestArgError);
        state.RegFunction("TestTableInCo", TestTableInCo);
        state.RegFunction("TestCycle", TestCycle);
        state.RegFunction("TestNull", TestNull);
        state.RegFunction("TestAddComponent", TestAddComponent);
        state.RegFunction("TestOutOfBound", TestOutOfBound);
        state.RegFunction("TestMulStack", TestMulStack);
        state.BeginStaticLibs("TestStack");
        state.RegFunction("Test1", Test1);
        state.RegFunction("PushLuaError", PushLuaError);
        state.RegFunction("Test3", Test3);
        state.RegFunction("Test4", Test4);
        state.RegFunction("Test5", Test5);
        state.RegFunction("Test6", Test6);
        state.EndStaticLibs();
        state.EndModule();

        //state.DoFile("TestErrorStack.lua");
        state.Require("TestErrorStack");
        show    = state.GetFunction("Show");
        testRay = state.GetFunction("TestRay");

        showStack   = state.GetFunction("ShowStack");
        test4       = state.GetFunction("Test4");
        CheckResult = state.GetFunction("CheckResult");


        TestDelegate += TestD1;
        TestDelegate += TestD2;
    }
    void Awake()
    {
        #if UNITY_5
        Application.logMessageReceived += ShowTips;
        #else
        Application.RegisterLogCallback(ShowTips);
        #endif
        Instance = this;
        new LuaResLoader();
        testGo = gameObject;
        state = new LuaState();
        state.Start();
        LuaBinder.Bind(state);

        state.BeginModule(null);
        state.RegFunction("TestArgError", TestArgError);
        state.RegFunction("TestTableInCo", TestTableInCo);
        state.RegFunction("TestCycle", TestCycle);
        state.RegFunction("TestNull", TestNull);
        state.RegFunction("TestAddComponent", TestAddComponent);
        state.RegFunction("TestOutOfBound", TestOutOfBound);
        state.RegFunction("TestMulStack", TestMulStack);
        state.BeginStaticLibs("TestStack");
        state.RegFunction("Test1", Test1);
        state.RegFunction("PushLuaError", PushLuaError);
        state.RegFunction("Test3", Test3);
        state.RegFunction("Test4", Test4);
        state.RegFunction("Test5", Test5);
        state.RegFunction("Test6", Test6);
        state.EndStaticLibs();
        state.EndModule();

        //state.DoFile("TestErrorStack.lua");
        state.Require("TestErrorStack");
        show = state.GetFunction("Show");
        testRay = state.GetFunction("TestRay");

        showStack = state.GetFunction("ShowStack");
        test4 = state.GetFunction("Test4");

        TestDelegate += TestD1;
        TestDelegate += TestD2;
    }
 private static void TestMul0()
 {
     TestLuaStack.TestMul1();
 }