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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

UPROPERTY Default Value

The editor does not recognise the default value set in C++ on UPROPERTY members of either a USTRUCT or UCLASS. I have tried setting a default value in both the constructor as well as in the header declaration. No matter what I try the little yellow arrow still appears next to every member in the editor. Clicking the yellow arrow does nothing either.

Product Version: UE 4.13
Tags:
more ▼

asked Nov 09 '16 at 10:22 PM in Bug Reports

avatar image

wilberolive
295 29 45 47

avatar image Holybreath Nov 10 '16 at 11:29 AM

screenshots?

avatar image Doug E ♦♦ STAFF Nov 10 '16 at 03:52 PM

Hey wilberolive-

When I change a variable value in my struct/header/constructor I see the change reflected in the editor after compiling.Can you provide additional details about the behavior you're seeing and the setup you're using?

avatar image wilberolive Nov 13 '16 at 02:36 AM

I have created a sample project to demonstrate the problem. I think it has something to do with arrays. Just open this project up and compile it. Then open the NewBlueprint I created in the Content folder. Take a look at the array I put in there. This comes from the C++ class with a C++ struct. Notice the little yellow arrow next to every variable in the struct. If you check the C++ source you will see that the default values have been set for them.

Based on the tooltip it seems like the little yellow arrow is there because the array is not at its default size. But that should only put a yellow array on the array itself, not on every member of every entry in the array right? Please tell me this is not "by design" but is instead a bug.

myproject.zip (11.6 kB)
(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey wilberolive-

Thank you for the sample project. You're correct that it appears to be a combination of the struct being inside of an array. I have reproduced this issue and logged a report for it here https://issues.unrealengine.com/issue/UE-38569 . You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

Doug Wilson

more ▼

answered Nov 14 '16 at 04:28 PM

avatar image Mind Conflicts Jan 28 '19 at 05:18 PM

Still not fixed in 4.21.2 version. Also if you have a

UPROPERTY() class UChildActorComponent* ChildActorComponent;

in that struct inside TArray and you click the yellow reset arrow, the property is set to 'None' instead of nullptr, and the actor is not garbage collected.

(comments are locked)
10|2000 characters needed characters left
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