getnamo/NodeJs-Unreal

Call unreal function by name

Opened this issue · 0 comments

Instead of emitting an event, we could also allow an optional mode where you can call bp/c++ functions directly in javascript without binding.

This would use similar arch to https://github.com/getnamo/nodejs-ue4/blob/master/Source/NodeJs/Public/NodeComponent.h#L119 but use a special event to encode both function and var passing.

potential api on js side

ipc.call('myfunction', object);

Would require a wrapper around ipc-event-emitter to add this support.

May extend this with RPC callbacks e.g.

ipc.call('myfunction', object, (data)=>{
    //on bp function used callback
});

Targeting would be owner of node component by default, but may add optional parameter to retarget. This should in theory support everything marked as UFUNCTION, which is exposed to the unreal reflection system.