#wdym? you're using it there, no?

1 messages · Page 1 of 1 (latest)

vital temple
#

here is my editor sorry

lofty zenith
#

I mean I showed you the snippet how you'd done it,,, you can't just call it like that

#
foreach (Delegate delegate in unityEvent.GetInvocationList())
{
    MethodInfo methodInfo = delegate.Method;

    string methodName = methodInfo.Name;
    //Do the rest with the methodInfo
}
vital temple
#

what type is your variable unityEvent ?

lofty zenith
#

UnityEvent as the name says

#

so in your case it's onResult

vital temple
#

Here to make it more clear. I don't have access to that GetInvocationList() method

lofty zenith
#

did you read my code snippet above?

vital temple
#

yeah I read it... what am I missing?

lofty zenith
#

oh!

#

try add using System; at the top there among other usings

vital temple
#

It is available - however Rider tells me it can be removed UnityChanThink

lofty zenith
#

Yeah, so Rider would mostly suggest you the correct thing to do, if you're doing it wrong btw just noticed, Get is not the same as GetInvocationList 😄

#

so now can't you just copy the snippet I made and replace it with your unityEvent

#

and see what it will say

vital temple
#

It's still as I said - I can't resolve the method it does not exist

#

the structure of the class just does not have it

lofty zenith
vital temple
#

Thanks I will check it out. But can you tell me why you are able to call the GetInvocationList method? Have you tested that?