[Mono-ue] BlueprintCallable UFunctions don't seem to work

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Nov 26 22:44:41 UTC 2014


We have a fix for this, I'll try to get an updated release done soon.

Our fix is pretty much the same as yours except using the P_FINISH
macro instead of incrementing the Code pointer directly. Using this
macro requires renaming the "TheStack" parameter to "Stack".

- m

On 26 November 2014 at 17:36, Duane Wandless <duane at wandless.net> wrote:
> I found a solution.  In MonoCompiledClassAsset.cpp, around line 77 in
> InvokeMonoEvent.
>
> // mono events should never be invoked by blueprint!
> //check(TheStack.Code == nullptr);
> if (TheStack.Code != nullptr)
> {
>    TheStack.Code++;
> }
>
> And then change all references of TheStack.Node to
> TheStack.CurrentNativeFunction.
>
> I'm assuming there is a different and better way to handle this case.  The
> change from TheStack.Node is the biggest unknown for me.  But at least for
> my testing this is working without issues.  I now have a BP Event On Picked
> Up and I can call the parent node which executes back in the C# code.  I
> also tested invoking a BlueprintCallable function.
>
>
> On Tue, Nov 25, 2014 at 4:01 PM, Michael Hutchinson
> <m.j.hutchinson at gmail.com> wrote:
>>
>> Thanks, I've asked one of our devs to look into it.
>>
>> On 25 November 2014 at 15:53, Eugene Tchoukhrov <ujen at vicogamestudio.com>
>> wrote:
>> > It's: public void OnAction()
>> > Nothing special.
>> >
>> > -----Original Message-----
>> > From: Michael Hutchinson [mailto:m.j.hutchinson at gmail.com]
>> > Sent: Tuesday, November 25, 2014 12:51 PM
>> > To: Eugene Tchoukhrov
>> > Cc: mono-ue
>> > Subject: Re: [Mono-ue] BlueprintCallable UFunctions don't seem to work
>> >
>> > It may be that you've found an edge case where we're where we're not
>> > dealing with the parameter buffer correctly for certain argument/return
>> > types. What is the signature of the method?
>> >
>> > On 25 November 2014 at 14:32, Eugene Tchoukhrov
>> > <ujen at vicogamestudio.com> wrote:
>> >> I created a simple UFunction with BlueprintCallable in C# but when I
>> >> call it from a blueprint the engine gets stuck in a loop.
>> >>
>> >>
>> >>
>> >> Specifically on line 589 of ScriptCore.cpp
>> >> (Engine/Source/Runtime/CoreUObject/Private/ScriptCore.cpp)
>> >>
>> >> It seems like Stack.Code gets corrupted or is incorrectly setup.
>> >>
>> >>
>> >> _______________________________________________
>> >> Mono-ue mailing list
>> >> Mono-ue at lists.ximian.com
>> >> http://lists.ximian.com/mailman/listinfo/mono-ue
>> >>
>> >
>> >
>> >
>> > --
>> > Michael Hutchinson ~ https://mhut.ch
>> >
>>
>>
>>
>> --
>> Michael Hutchinson ~ https://mhut.ch
>> _______________________________________________
>> Mono-ue mailing list
>> Mono-ue at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-ue
>
>



-- 
Michael Hutchinson ~ https://mhut.ch


More information about the Mono-ue mailing list