Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0 增加事件回调 ,CLRRedirections.DelegateCombine 获取 dele1 对象错误 #735

Open
ezersdev opened this issue Oct 10, 2022 · 0 comments

Comments

@ezersdev
Copy link

ezersdev commented Oct 10, 2022

Describe the bug
在增加事件回调时候,执行CLRRedirections.DelegateCombine 获取dele1对象错误, 导致(Delegate)dele1异常, dele2获取正确, 回滚到2.0.2版本 无此问题

To Reproduce
下面是对应Hotfix中的代码

    private Action<float, int> _distanceChangeDelegate ;
    public event Action<float, int> onDistanceChange
    {
        add
        {
            _distanceChangeDelegate += value;
        }
        remove
        {
            _distanceChangeDelegate -= value;
        }
    }

// 使用上面的定义 会出现描述的错误
onDistanceChange+= _moveManager.OnDistanceChanged;
// 如果直接使用 原对象则正常执行
_distanceChangeDelegate += _moveManager.OnDistanceChanged;

Unity Version
2020.3.40f1

ILRuntime Version
2.1.0

@ezersdev ezersdev changed the title 增加事件回调 ,CLRRedirections.DelegateCombine 获取 dele1 对象错误 2.1.0 增加事件回调 ,CLRRedirections.DelegateCombine 获取 dele1 对象错误 Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant