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"

[4.7 Bug] Properties inside struct, can't be edited when object is instanced inline inside ActorComponent


Create simple USTRUCT():

 struct FGAAttributeBase
         FName AttributeName;
     UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Value")
         float BaseValue;

Now create new UObject Class:

 UCLASS(BlueprintType, Blueprintable, DefaultToInstanced, EditInlineNew)
 class UARCharacterAttributes : public UObject
     UARCharacterAttributes(const FObjectInitializer& ObjectInitializer);
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Resources")
         FGAAttributeBase Health;

And Finally new ActorComponent:

 UCLASS(hidecategories = (Object, LOD, Lighting, Transform, Sockets, TextureStreaming), editinlinenew, meta = (BlueprintSpawnableComponent))
 class UGAAttributeComponent : public UActorComponent
     UPROPERTY(EditAnywhere, BlueprintReadOnly, Instanced, Replicated)
         class UARCharacterAttributes* DefaultAttributes;

Add this component to your character, using ObjectInitializer.

Launch, project, and try to edit Health property.

I have been using latest 4.7 from github.

Product Version: Not Selected
more ▼

asked Feb 10 '15 at 07:50 AM in Bug Reports

avatar image

1.6k 105 97 185

avatar image twiddle Feb 18 '15 at 09:09 PM

Just a quick observation - I haven't checked this, but doesn't

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Value")

float BaseValue;

mark the Basevalue as non-editable? Marking the overall UProperty struct as editable wouldn't change all the struct's members to editable. Seeing as your only visible property (Basevalue) is not editable it would look, in the editor, as though the whole struct wasn't able to be edited.

avatar image iniside Feb 18 '15 at 09:53 PM

No it will just make it ReadOnly in graph.

It works just fine in defaults.

avatar image Tim C ♦♦ STAFF Mar 10 '15 at 08:32 PM

Hi iniside,

Sorry for the delay in responding to this post. I used the code you provided to try to reproduce this issue, but received a LNK2019 compile error in GAAttributeComponent. Would it be possible to see the code in the source file for this class?


avatar image TheJamsh Aug 11 '18 at 08:52 PM

This is still an issue in 4.20! How has this not been resolved yet...

Would love to know where to look to start fixing this. Happy to do a PR.

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

2 answers: sort voted first

Hi iniside,

We have not heard back from you for a few days. Do you still need help with this issue? I will be marking this issue as resolved for tracking purposes, but please feel free to re-open this post at any time if you need any additional help.


more ▼

answered Mar 16 '15 at 06:41 PM

avatar image iniside Mar 16 '15 at 08:49 PM

Hey sorry for late reply, I was on the road, over past few days and wasn't able to create project which would reproduce the issue. But here is download link: https://dl.dropboxusercontent.com/u/70400220/Bugs/StructBug.7z Just open this project, and check character component. You should be able to select one class for the Attributes field.

In that class there will be property Health (under resources category), And as you can see you can't change properties inside Health struct.

I checked it against latest binary.

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

Hi iniside,

Thank you for providing the sample project. I was able to see what you were referring to, and used that project as a basis to test this issue in our latest internal build of the Engine. I saw the same results there, and have submitted a report to have this investigated further (UE-12025).


more ▼

answered Mar 17 '15 at 08:14 PM

avatar image Xanen0 Jan 28 '16 at 09:17 PM

Hi Tim. Do you have any update on the status of this issue?

avatar image Tim C ♦♦ STAFF Feb 01 '16 at 09:39 PM

Hi Xanen0,

Unfortunately this issue has not yet been resolved. The ticket is still open.

There may be a possible workaround, though. From what I can tell, the properties being uneditable only occurs if the ActorComponent they are instanced within is added to a class via C++. If you are able to add the ActorComponent in the Blueprint Editor, the properties can usually be edited.


avatar image undercover Jun 20 '16 at 10:24 AM

I can confirm the issue is still in version 4.12.3...

avatar image Tim C ♦♦ STAFF Jun 28 '16 at 08:41 PM

Hi undercover,

Thank you for letting us know. I have updated the report of the issue to indicate that it is still occurring in 4.12.


(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