-
When attempting to do some transpile patches. The best spot to hook in this method appears to be the GameObject.Instantiate method. However, it's using an overload I seem to be unable to get my hands on a reference for. I tried to get the overload with something like this below. I figured since it's a generic method I would need a generic.. but none of those come out with anything except an exception (so I must be using it wrong?)
Which returns You'll notice -- it's giving me the base class method |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The discord server is the main place to give support. Please use it instead of GitHub. You are not using the correct reflection code. You need to call MakeGenericMethod(). But harmony also does not officially support generics so patching can still fail or behave weird. |
Beta Was this translation helpful? Give feedback.
The discord server is the main place to give support. Please use it instead of GitHub.
You are not using the correct reflection code. You need to call MakeGenericMethod(). But harmony also does not officially support generics so patching can still fail or behave weird.