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

[Unity] 有多个重载函数时,通过反射调用,会匹配到错误的函数,导致参数越界 #912

Closed
emutime opened this issue Jul 15, 2022 · 0 comments

Comments

@emutime
Copy link
Contributor

emutime commented Jul 15, 2022

error log | 日志或报错信息

context | 编译/运行环境

how to reproduce | 复现步骤

  1. 声明如下两个函数
    public BuyDiamondReq ($data: ShopData, $callback: UnityEngine.Events.UnityAction$1<System.Collections.Generic.List$1>, $bClickMark?: boolean, $bCongrat?: boolean, $bForceEvent?: boolean, $pfExtraInfo?: string) : void

public BuyDiamondReq ($data?: ShopData, $buyReqParam?: BuyReqParam) : void

  1. TS侧调用如下
    (ServiceShop.Instance as ServiceShop).BuyDiamondReq(diamondGoodsData);

  2. 启动反射调用,调用时会匹配到第一个函数,取参数时会越界

more | 其他

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