Download

Unreal Editor doesn't display USTRUCT correctly

This is my code:

USTRUCT(meta = (DisplayName = “Track Info”, Keywords = “Track info”))
struct FTrackInfo
{
GENERATED_BODY()

    UPROPERTY(meta = (Input))
    FString label;

    UPROPERTY(meta = (Input))
    FString from;

    UPROPERTY(meta = (Input))
    FString to;

};

This is in my actor class:

UPROPERTY(EditAnywhere, Category = "General")
TArray<FTrackInfo> TrackLabels;

The editor only shows me something like “X array elements” and below there are the elements like:
0 0 members
1 0 members
2 0 members
.
.
.

How do I fix it? I can’t input anything.

Hello,
I believe you are missing two things:
-your USTRUCT should be defined as ‘BlueprintType’
-your UPROPERTY should contain ‘BlueprintReadWrite’ or ‘EditAnywhere’ (I have only tested ‘BlueprintReadWrite’)

Something like this:



USTRUCT(BlueprintType, meta = (DisplayName = "Track Info", Keywords = "Track info"))
struct FTrackInfo
{
    GENERATED_BODY()

    UPROPERTY(BlueprintReadWrite, meta = (Input))
    FString label;

    UPROPERTY(BlueprintReadWrite, meta = (Input))
    FString from;

    UPROPERTY(BlueprintReadWrite, meta = (Input))
    FString to;
};


Turns out this solved my problem:
UPROPERTY(EditAnywhere, SimpleDisplay, meta = (Input))