安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题









Sorry to hear that. Abbysssal really knows his stuff though, so if you contact him at the Discord he might be able to help you find an elegant workaround.
The class that I'm trying to modify is a generic parser and is used with several hundreds of generic types. Covering all possibilities isn't exactly an option for me.
I didn't expect this to be an issue, since {链接已删除} the documentation seems to suggest that the patched method would be shared across all non-value Types.
It also states `If the method is a non-generic non-static method of a generic class, you can check the generic type using __instance` which implies that modifying these methods should be possible?
I guess I'll have to look for a different workaround.
I spoke to Abbysssal about it: apparently this is a known issue in BepInEx.
Here [github.com.cnpmjs.org] is a comment on this topic by the BepInEx creator. TL;DR: It's not something they have control over so it's pretty much a limitation of BepInEx patching.
As for what to do about it? Abbysssal advises that the next best thing would be patching each possibility you expect that Generic to encounter. Yes, it's extra work, but the SOR codebase is *very* hardcoded so Generics are extremely rare. Rare enough that in the nearly 10,000 lines of code I've written for my own mod, I have not encountered this problem.
Again, if you can point to a particular example of what you mean, I might be able to give more specific advice. I hope this helped, though.
How do I patch a non-generic method of a generic class? (So far I'm consistently getting `NotSupportedException: Specified method is not supported.`)