-
Notifications
You must be signed in to change notification settings - Fork 14
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
[异常] (装饰器) 函数参数泛型自带 UnityEngine.Object 抛异常 #4
Comments
原因已经找到 MethodBase.GetSignature函数与MethodDefinition.GetSignature函数判断值出现不一致
|
@xinansky 感谢fix,下个版本修正 |
MetadataToken是一种很聪明的做法,但新的修复还是使用签名的方式实现,原因有下:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
示例:
函数A:public static void LoadSubAssets(string location, Action<Object[]> cb)
函数B:public static void LoadSubAssets(string location, Type type, Action<Object[]> cb)
函数C:public static void LoadSubAssets(string location, Action<TObject[]> cb) where TObject : Object
给函数B加上自定义装饰器实现了 DecoratorAttribute 的属性 并开始编译
会抛出异常 信息如下
Exception: Cannot find Method
LoadSubAssets
in Typexxxx_class
报错库函数:
InjectHelper.cs
FindMethod td.Methods.FirstOrDefault(m => m.GetSignature() == methodSignature) == nullUnity版本 2022.3.8f1
The text was updated successfully, but these errors were encountered: