Example function provided by the user:

UFUNCTION(BlueprintCallable, meta = (AutoCreateRefTerm = 
static void TestAutoRefs(const int32& TestInt = 2, const FName& TestName = 
"Test Default Name");


void ATestActor::TestAutoRefs(const int32& TestInt, const FName& TestName)
UE_LOG(LogTemp, Warning, TEXT("%d"), TestInt);
UE_LOG(LogTemp, Warning, TEXT("%s"), *TestName.ToString());
Steps to Reproduce
  1. Create a blueprint callable function with the AutoCreateRefTerm for a const
    reference parameter.
  2. Make sure the parameter’s default value is different than the variable type
    default e.g 0 for int, “None” for FName.
  3. Call that function in a blueprint graph and check what values were used as the
  4. The expected outcome would be the value seen in the pin of the parameter,
    however instead you will find that the default value of the variable type was
    passed instead of the user specified default

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-186994 in the post.

Login to Vote

ComponentUE - Gameplay - Blueprint Editor
Affects Versions5.1
Target Fix5.5
CreatedMay 25, 2023
UpdatedApr 26, 2024
View Jira Issue