Ejemplo n.º 1
0
        public static void OnHotFixTest(object main_test, int arg1, float arg2)
        {
            Debug.Log("修复一个bug arg1:" + arg1.ToString() + "arg2:" + arg2.ToString());
            Debug.Log("开始测试反射访问私有变量");
            main_test.CallPrivateMethod("Test1", 10);
            Debug.Log("结束测试反射访问私有变量");

            //尝试使用mono的一个delegate
            TestDelegate.TestExportDelegate call = OnCallDelegate;
            TestDelegateData data = new TestDelegateData();

            data.m_Field = 12;
            Debug.Log(call(data, 2, 2));
        }
Ejemplo n.º 2
0
 private static int OnCallDelegate(TestDelegateData a, int b, long c)
 {
     return(a.m_Field + b);
 }