Developer Notes

This issue is not a high priority at the moment.

Description

ShowOnlyInnerProperties doesn't work when the struct in question is either in an array or in an outer struct in an array. (There may be other broken cases as well.)

Example:

USTRUCT()
struct StructB
{
   GENERATED_USTRUCT_BODY()

   UPROPERTY(EditAnywhere, Category=MyCategory)
   int32 DataThatShouldInline;
}

USTRUCT()
struct StructA
{
   GENERATED_USTRUCT_BODY()

   UPROPERTY(EditAnywhere, Category=MyCategory)
   int32 X;
   
   UPROPERTY(EditAnywhere, Category=MyCategory, Meta=(ShowOnlyInnerProperties))
   StructB B;
};

and in a UCLASS somewhere:

UPROPERTY(EditAnywhere, Category=MyCategory)
TArray<StructA> TableOfStructAs;

UPROPERTY(EditAnywhere, Category=MyCategory)
TArray<StructB> TableOfStructBs;

In both cases, the table will still show a "StructB" that has to be expanded to see its contents, rather than correctly showing the members as directly part of StructA or as part of the array element (in the latter case).

It's possible that this problem exists for any struct-within-a-struct as well (even without an array), but I haven't investigated. It does work correctly when the struct is at the root level of the UCLASS, but possibly in no other cases.

Steps to Reproduce

n/a

Have Comments or More Details?

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

7
Login to Vote

Won't Fix
ComponentTools
CreatedApr 30, 2015
ResolvedJul 25, 2016
UpdatedJul 14, 2021