Suggested workflow is to create the component and then add it to an array rather than creating components as part of the array
When an array is used to declare actor components, the component elements that make up the array cannot be edited inside blueprints.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) TArray<UBoxComponent*> Boxes; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) USceneComponent* MyScene;
MyScene = CreateDefaultSubobject<USceneComponent>(TEXT("MyScene")); RootComponent = MyScene; Boxes.SetNum(2); Boxes[0] = CreateDefaultSubobject<UBoxComponent>(TEXT("NewBox1")); Boxes[0]->AttachTo(RootComponent); Boxes[1] = CreateDefaultSubobject<UBoxComponent>(TEXT("NewBox2")); Boxes[1]->AttachTo(RootComponent);
Result:
Transform widget is missing and Details panel is blank so the component cannot be edited through the blueprint
Expected:
BP components that are created as part of an array can be edited through blueprints.
How does TextureRenderTarget2D get TArray<uint8> type data?
UMG RichText not appear image when packaged
Why does the REMOVE method of map container remove elements have memory leaks?
How to delete some elements correctly when deleting an array loop?
An Unreal process has crashed: UE-4-Panzer Corps2
How to convert the datasmith scene file to BluePrint. Create animations in BluePrint.
my UEFN wont lunch it say Failed to open descriptor file ../../../FortniteGame/FortniteGame.uproject
Head over to the existing Questions & Answers thread and let us know what's up.
9 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.11 |
Created | Mar 8, 2016 |
---|---|
Resolved | Jul 15, 2016 |
Updated | Jul 14, 2021 |