Developer Notes

This is an intentional change in behavior. A non-BlueprintType USTRUCT should not be visible to blueprints.

Description

Defining a FBoneReference variable as BlueprintReadWrite or BlueprintReadOnly in the UPROPERTY macro fails to compile in 4.17. The error message provided by VS states:

LogCompile: Error: Type 'FTestStruct' is not supported by blueprint. MyActor.Rando

This is likely caused by FBoneReference's USTRUCT not including the BlueprintType specifier

Regression:
Yes - Code provided in repro steps does compile successfully in 4.16.3 binary

Workarounds:

  • Adding BlueprintType to FBoneReference's USTRUCT macro allows repro code to compile
  • Creating a wrapper struct that is BlueprintType with a FBoneReference variable will compile if FBoneReference FingerTipBone; is replaced with FWrapperStruct WrapperVar; in the repro steps
  • Removing BluerpintReadWrite from the UPROPERTY macro allows VS to compile
Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor (MyActor)
  3. Add the following struct above the UCLASS macro
    USTRUCT()
    struct FTestStruct
    {
         GENERATED_BODY()
         float someNum;
    };
    
  4. Add the following to the body of the class
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
    FTestStruct Rando;
    
  5. Compile

Result:
Compile fails stating that FTestStruct is not supported by blueprints

Expected:
VS compiles successfully with exposed FBoneReference variable

Have Comments or More Details?

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

0
Login to Vote

By Design
CreatedAug 22, 2017
ResolvedAug 23, 2017
UpdatedApr 27, 2018