Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
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 {LINK REMOVED} 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.`)