x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Component details panel blank if pointers stored in struct array

Hey,

the blueprint details panel is blank if I store the component pointers in a struct + array but the details panel of placed actors works. It works fine if I declare them without struct and array. What am I doing wrong?

In header of actor but outside of the class:

 USTRUCT(BlueprintType)
 struct FTestStruct
 {
     GENERATED_USTRUCT_BODY()
 
     UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Test")
     USceneComponent* testComponent;
 
     FTestStruct()
     {
         testComponent= nullptr;
     }
 };

In the actor header:

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Test")
 TArray<FTestStruct> testStructs;

In the constructor:

 FTestStruct testStruct;
 testStruct.testComponent = CreateDefaultSubobject<USceneComponent>("TestComponent");
 testStruct.testComponent->AttachTo(RootComponent);
 testStructs.Add(testStruct);

Greetings

Product Version: Not Selected
Tags:
more ▼

asked Apr 27 '15 at 04:36 PM in C++ Programming

avatar image

Reisn7CC
20 4 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello, Reisn7CC

It looks like you had created the Blueprint before the struct was added to the class. Please recreate the Blueprint.

Hope this helped!

Cheers!

more ▼

answered May 08 '15 at 12:55 PM

avatar image

Andrii Melnyk
1.9k 60 20 112

avatar image Reisn7CC May 10 '15 at 02:24 PM

Thanks for the answer. I probably created the blueprint before I created the struct but I just created a new blueprint and unfortunately the details panel is still blank.

avatar image vipeout Jul 25 '16 at 12:44 PM

Have you ever fixed this issue? I'm having the exact same problem - array of structs that have pointers to components and those fields are completely invisible, other fields of the struct are visible and editable as always.

What's more tricky, is that I can edit those components through the struct on an instanced object present on a map, but not from defaults in the BP editor.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Sorry to hear about that.

Please note that there is a possibility that in Blueprint editor Details panel is blank because in Components tab some Component of Blueprint (but not the Blueprint itself) is selected.

Hope this helped!

more ▼

answered May 11 '15 at 08:41 AM

avatar image

Andrii Melnyk
1.9k 60 20 112

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question