StateTreePropertyRef no longer can be promoted to parameter in 5.6?

I got a report from one of my designers that since we took 5.6, they have been unable to see the “Promote to Parameter” options when attempting to bind an output from one of our common tasks. I took a look at the code and sure enough, the behavior changed in 5.6, although the comment describing the intended behavior did not. Is this a bug?

5.5 behavior of FStateTreeBindingExtention::CanPromoteToParamter (line 1781)

else if (const FStructProperty* StructProperty = CastField<FStructProperty>(Property))
{
    // Support Property Refs as even though these aren't bp types, the actual types that would be added are the ones in the meta-data RefType
    if (StructProperty->Struct && StructProperty->Struct->IsChildOf(FStateTreePropertyRef::StaticStruct()))
    {
       return true;
    }

5.6.1 behavior - refactored into a separate function

bool FStateTreeBindingExtension::GetPromotionToParameterOverrideInternal(const FProperty& InProperty, bool& bOutOverride) const
{
    if (const FStructProperty* StructProperty = CastField<FStructProperty>(&InProperty))
    {
       // Support Property Refs as even though these aren't bp types, the actual types that would be added are the ones in the meta-data RefType
       if (StructProperty->Struct && StructProperty->Struct->IsChildOf(FStateTreePropertyRef::StaticStruct()))
       {
          bOutOverride = false;
          return true;
       }
    }
    return false;
}

bOutOverride is initialized to false at the callsite so this can never return true. Just wanted to bring this to your attention as it seems like a mistake.

Steps to Reproduce
Create any StateTreePropertyRef parameter for a State tree task

It does appear to be a bug on our side. I created a bug report for it which can be found here: https://issues.unrealengine.com/issue/UE-352719. It can take a couple days for our system to mirror over and be approved for display on the public issue tracker. It will be updated there though. It does appear to be a regression and will not make the cut for 5.7 release. There is still chance for the fix to be a part of one of the hotfixes for 5.7 though.

-James

There is an initial fix submitted for this at CL#47892199 in UE5 Main P4. I do not believe it will be in a release stream until 5.7.2 is out.

-James

Thanks for checking :slight_smile: I will locally modify it to the expected behavior and resolve the merge once it makes its way down to us.