Description

Example function provided by the user:
.h

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

.cpp

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
    defaults.
  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.

0
Login to Vote

Unresolved
ComponentUE - Gameplay - Blueprint Editor
Affects Versions5.1
Target Fix5.6
CreatedMay 25, 2023
UpdatedSep 30, 2024
View Jira Issue