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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

.h

alt text


.cpp

alt text


alt text


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.

Product Version: UE 4.19
Tags:
captura.png (38.6 kB)
cpp.png (11.6 kB)
h.png (6.9 kB)
more ▼

asked May 01 '19 at 08:37 PM in C++ Programming

avatar image

danielf94
61 2 4 9

avatar image Lardo Deepdelver May 01 '19 at 11:17 PM

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

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

3 answers: sort voted first

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.

more ▼

answered May 01 '19 at 11:05 PM

avatar image

Bojan Novakovic
31 3 3

avatar image danielf94 May 02 '19 at 03:05 PM

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

avatar image Bojan Novakovic May 02 '19 at 03:33 PM

Maybe take a look at this one too: https://answers.unrealengine.com/questions/562131/set-members-of-tarray-as-uproperty.html

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

avatar image danielf94 May 02 '19 at 04:38 PM

thanks, I'll see what I solve

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

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 : https://wiki.unrealengine.com/UPROPERTY#BlueprintReadWrite

more ▼

answered May 02 '19 at 06:00 AM

avatar image

plangton
357 17 20 31

avatar image Lardo Deepdelver May 02 '19 at 06:40 AM

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

avatar image danielf94 May 02 '19 at 03:03 PM

it doesn't work

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

Try

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

more ▼

answered May 23 '19 at 07:26 AM

avatar image

MoooDob
6 1

(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