예제 #1
0
    //这个仅为演示demo用,平时不要这么调用
    void RetryCLRRedirection()
    {
        var       type   = appdomain.GetType(typeof(CLRBindingTestClass));
        CLRMethod method = type.GetMethod("DoSomeTest", 2) as CLRMethod;

        method.RetryCLRRedirection();
    }
예제 #2
0
    //这个仅为演示demo用,平时不要这么调用
    void RetryCLRRedirection()
    {
        var       type   = appdomain.GetType(typeof(Debug));
        CLRMethod method = type.GetMethod("Log", 1) as CLRMethod;

        method.RetryCLRRedirection();
    }
예제 #3
0
    //这个仅为演示demo用,平时不要这么调用
    void RetryCLRRedirection2()
    {
        var       type   = appdomain.GetType(typeof(GameObject));
        var       mt     = appdomain.LoadedTypes["HotFix_Project.SomeMonoBehaviour2"];
        CLRMethod method = type.GetMethod("GetComponent", new List <IType>(), new IType[] { mt }, mt) as CLRMethod;

        method.RetryCLRRedirection();
    }