示例#1
0
    private void Start()
    {
        Debug.Log("普通日志");
        Debug.LogError("普通错误");

        _msgId = PinnedLog.AddMsg("我是不会被清掉的日志");

        // 实例方法替换测试
        InstanceMethodTest InstanceTest = new InstanceMethodTest();

        InstanceTest.Test();

        // 属性替换测试
        PropertyHookTest propTest = new PropertyHookTest();

        propTest.Test();

        // 参数类型是私有类型的方法替换测试
        PrivateTypeArgMethodTest privateTypeArgMethodTest = new PrivateTypeArgMethodTest();

        privateTypeArgMethodTest.Test();

        // 构造函数替换测试
        CtorHookTest ctorHookTest = new CtorHookTest();

        ctorHookTest.Test();

        // 测试GameObject.SetActive
        btn.gameObject.SetActive(false);
        btn.gameObject.SetActive(true);
    }
示例#2
0
    private void Start()
    {
        Debug.Log("普通日志");
        Debug.LogError("普通错误");

        _msgId = PinnedLog.AddMsg("我是不会被清掉的日志");

        // 测试实例方法替换
        InstanceMethodTest test = new InstanceMethodTest();

        test.Test();
    }
示例#3
0
    private void Start()
    {
        Debug.Log("普通日志");
        Debug.LogError("普通错误");

        _msgId = PinnedLog.AddMsg("我是不会被清掉的日志");

        // 测试实例方法替换
        InstanceMethodTest InstanceTest = new InstanceMethodTest();

        InstanceTest.Test();

        // 测试属性替换
        PropertyHookTest propTest = new PropertyHookTest();

        propTest.Test();
    }