Specific C++ Interface function not being called in BP

Hi everyone,

I’m facing a really strange problem. I have this interface

// This class does not need to be modified.
UINTERFACE(Blueprintable, BlueprintType, MinimalAPI)
class UMetaTargetingActorInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 *
 */
class CUSTOMCAMERA_API IMetaTargetingActorInterface
{
	GENERATED_BODY()

		// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:

	/** This function is called in BP */
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Input")
		bool SetCurrentTarget(FMetaFocusActor NewTarget);

	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Input")
		bool IsSelectingTarget() const;

	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Input")
		FVector2D GetCurrentTargetSelectionInput() const;

	/** This one is never called in BP*/
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Input")
		bool GetCurrentTarget(FMetaFocusActor& OutFocus);
		
};

And has it’s written in comments, the last function is never called in BP.

And in code I have this

	if (!ViewTarget->GetClass()->ImplementsInterface(UMetaTargetingActorInterface::StaticClass())) return false;

	FMetaFocusActor currentTarget;
	IMetaTargetingActorInterface::Execute_GetCurrentTarget(ViewTarget, currentTarget);

I have step debug trough it. I can even get to the Invoke() inside Class.h but in BP… nothing and my currentTarget is always non initialized.

Does anyone succeed to do it ? Or have any clue ?

Best regards everyone :slight_smile:

Alex

What do you have on Blueprint side?

Ooooooooh, I’m currently feeling an emotion called… shame. I had a child actor of that BP which strangely had overrided this function… -_-"

Sincerely sorry.

At least you have an example of a well implemented C++ interface which communicate with BPs.