How to create BP callable function on C++ with params that need to be not null to compile on BP?

Hi guys, i’m sorry if this question is already answered but i couldn’t find it.

I made a function on C++ which is callable from blueprints and has one ActorComponent parameter. Everything works ok if i call the function from the blueprints and if i set an ActorComponent to the node.

But is there a way to configure the function (using UFUNCTION() perhaps) so if i use the function on Blueprints but i forgot to plug an ActorComponent reference it should give me an error when i compile the Blueprint? For example it should give me an error when compiling the Blueprint if i use the function as the image attached.

Right now i’m solving this issue on C++ but the error is shown at runtime and i think that there’s a better solution for this. Thanx.

I don’t think you can do that, this would require UFUNCTION meta data implementation or creating new UK2Node, submit feature request in feedback forum, i personally like this idea too, but remeber you want required pin to plug in to node i think it will be easier to implement. If you got skill you might also consider implment this yourself to engine and submit change to github :slight_smile:

Thanx for the answer. I think i will try to implement it by myself but any pointer about how to do it and what files/libraries to use will be very welcome!