1
\$\begingroup\$

I have a struct: "FOuterStruct"

This is defined in code such that it contains another struct type:

Struct OuterStruct
{
    UPROPERTY(...)
        FInnerStruct memberStruct;
}

Now.

When I break an FOuterStruct apart within blueprints, I do not get the FInnerStruct as a pin on the resultant node.

How am I to edit/access this FInnerStruct?

\$\endgroup\$
  • \$\begingroup\$ Is FInnerStruct declared as USTRUCT(BlueprintType)? What's the ... contain, does it contain any specifiers that indicate that the member is Blueprint-visible? \$\endgroup\$ – user1430 Oct 9 '19 at 15:20
  • \$\begingroup\$ Aha. It may be worth mentioning that it's an FComponentReference, which is indeed, not declared as BlueprintType. This is weird, because these values can all be edited as defaults, just not inside the event graph. I'm going to guess that to change this, I'll have to edit EngineTypes.h and start building Unreal Engine from source? \$\endgroup\$ – Natalo77 Oct 9 '19 at 15:32
  • \$\begingroup\$ Hey @Josh if you put that as an answer, I'll accept it, as it solved my issue \$\endgroup\$ – Natalo77 Oct 14 '19 at 14:22
  • \$\begingroup\$ @Protoss seems to have posted an answer covering that information, does that suffice? \$\endgroup\$ – user1430 Oct 14 '19 at 15:36
  • \$\begingroup\$ @Josh This is a weird situation, because his answer is technically correct, however your answer made me realize the unreal limitation that led me to ask this question. I guess people may follow both routes to get to this question... So with that in mind, you think it's best to accept his answer still, considering the actual title of the question? \$\endgroup\$ – Natalo77 Oct 14 '19 at 15:41
2
\$\begingroup\$

You can try like this.
Define Struct:

USTRUCT(BlueprintType)
struct MYRROJ_API FMyStruct
{
    GENERATED_USTRUCT_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Test")
        int32 Test;

    FMyStruct()
    {

    }
};

Usage:

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
    FMyStruct Test;
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.