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\$
7
  • \$\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\$ Commented Oct 9, 2019 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\$ Commented Oct 9, 2019 at 15:32
  • \$\begingroup\$ Hey @Josh if you put that as an answer, I'll accept it, as it solved my issue \$\endgroup\$ Commented Oct 14, 2019 at 14:22
  • \$\begingroup\$ @Protoss seems to have posted an answer covering that information, does that suffice? \$\endgroup\$ Commented Oct 14, 2019 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\$ Commented Oct 14, 2019 at 15:41

1 Answer 1

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;
\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.