Safer use of BindUFunction for delegates if UFUNCTION signatures mismatch

Hi there,

Recently I caused a crash with a delegate’s stack.

The following code has one safe guard, it checks if there is a typo in the function provided to BindUFunction.

Q: Is there a way to not only test if a bind found a function, but also if the signature is correct?

I am asking since execution of the delegate can cause a crash of the editor after a call of a bound function with a wrong signature, for example if it has a return value and the delegate’s signature doesn’t.

	FTestIfHitByClickDelegate Delegate;
	Delegate.BindUFunction(this, "SingleClick_TestIfHitByClick");

	// Added this as a first guard
	if (!Delegate.IsBound())
	{
		UE_LOG(LogTemp, Warning, TEXT("EnableSingleClickFunctions - Delegate not bound!"));
	}