I can not edit my components created in C++ in the editor





As you can see, he will not let me edit and this message appears:

native components are editable when declared as a uproperty in c++

some answer? from now thanks.

I think the issue here is you declared TArray as UPROPERTY, but not the Pipelines themselfs. Just for the testing, do not use TArray, added them separately one by one object, and use UPROPERTY(EditAnywhere). I think it should work then.
When I’ve had a similar situation where I need to have same things couple of times, and array of those, I would create each one separately and add them to array one by one after they are created.

tried to get it to work, but failed horribly
I don’t think the unreal editor can work with a TArray of components

if it’s really only 4 elements i think you have to unroll the for loop and add for

UStaticMeshComponent Pipepline1;

to the code

the only thing components should be VisibleAnywhere not editable, you don’t want to set the pointer, but change the values of the object you are pointing to

you need to add “BlueprintReadWrite” after EditAnywhere. Editanywhere indicates the places it can be edit, for example, the property window, but still doesn’t give permission for a blueprint to edit it.
more info : A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

Tried that, but still couldn’t get the components to work in a TArray

it doesn’t work

Yes I know, but I wanted it in the most dynamic way

Maybe take a look at this one too: Set UPROPERTY specifiers for members of TArray - C++ - Unreal Engine Forums

But it seems like, it’s just not meant to be like that :(.

thanks, I’ll see what I solve


Pipelines[i]->CreationMethod = EComponentCreationMethod::Instance;

1 Like