Announcement

Collapse
No announcement yet.

Struct constructor default value for TSet

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Struct constructor default value for TSet

    Say I have the following in a C++ class exposed to blueprints:
    Code:
    USTRUCT(BlueprintType)
    struct FFooBarBaz
    {
        GENERATED_BODY()
        FMyStruct(FString foo = "", TSet<FString> bar = TSet<FString>(), FDateTime baz = FDateTime()) : Foo(foo), Bar(bar), Baz(baz) { }
    
        UPROPERTY(BlueprintReadWrite)
        FString Foo;
    
        UPROPERTY(BlueprintReadWrite)
        TSet<FString> Bar;
    
        UPROPERTY(BlueprintReadWrite)
        FDateTime Baz;
    }
    When I try to create this Structure in a blueprint I'm faced with one problem.
    The "Foo" and "Baz" are properly being considered as having default value and I can leave them blank when using the "make struct" node in a blueprint, but the "TSet" is still asking me to provide a "TSet" (Like the attachment shows).

    Any ways to make it so that it doesn't ask for a "TSet" in blueprint if there is one provided by default from the constructor?
    Attached Files
Working...
X