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"

Construction Script doesn't get properties that are overridden on a map instance of the object.

Create a blue print. Add a text render component. In the construction script, add a PrintString node with the Text Render's text. Add an instance to the map. Edit the text. Look at the output log. It's still using the default value of the text render, not the value you've set it to on this instance.
I've seen this same problem with floats and Booleans as well. Pulling values off of a child component in the parent's construction script seems to just have gotten broken. I'm generating things based on the values in my construction script, and they always use the default rather than the values set for the instance on the map. For example, I've got a component that has a float on it, I build a text render to display the value in the construction script. The TR always has the default value, even though in the editor properties window and at run time the float value is correct. I'm pretty sure this worked a build or two ago.

Product Version: UE 4.9
more ▼

asked Oct 06 '15 at 01:05 AM in Bug Reports

avatar image

56 2 3 4

avatar image EstherZuidgeest Feb 22 '18 at 10:50 AM

This is still not fixed?! How can something so vital not be working o.O?

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

2 answers: sort voted first

I've submitted a pull request with a fix for this issue: https://github.com/EpicGames/UnrealEngine/pull/5239

It applies instance data before the construction script runs, so component properties have their instance values while the blueprint runs.

more ▼

answered Nov 02 '18 at 09:19 PM

avatar image

11 5 2

avatar image Jekteir Nov 06 '18 at 12:56 AM

@Matt.Enright, I hope your fix works and gets into the engine soon! I just encountered this bug again in my current project, 3 years after discovering this bug the first time...

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

Hey RickSaada,

Thanks for the report! I was able to reproduce this in 4.9.2 and our internal build, so I've entered a bug report for the issue (UE-21838). I'll post here if I see any update. As you mentioned, this did not occur in 4.8.3.

For now, a workaround is to create a variable for the property you'd like to update and set the variable to Editable. Then in the Construction Script, set the property value to the value of the the variable:

alt text

This way you can update the variable in the instance's Details panel and it will update, as the bug appears to only affect components and not the entire instance. Hope that helps!

more ▼

answered Oct 06 '15 at 03:48 PM

avatar image RickSaada Oct 06 '15 at 07:01 PM

That doesn't really work around the problem. Floats and bools on the component exhibit the same bug. I've got a custom component I'm using and map instance overrides aren't working there either. TextRender was just the simplest repro I could hand you. I'd have to put the variables on the parent object instead of on the component, and since I've got 20+ components hanging off the main object this would be really awkward in our situation. Hopefully this can be fixed fairly soon, since it really breaks using blueprints with any kind of customization.



avatar image Ben Halliday STAFF Oct 06 '15 at 08:03 PM

It should work around the problem if you set the variable to be Editable so it can be accessed on the Actor rather than the Component in the Details panel, and set whatever component property to its value in the Construction Script; I tested this with Scale (float) on Mesh components and bools for Visibility on components, etc, not only on Text Render. I understand it would involve a number of extra variables in your Blueprint, and possibly some awkward Construction Script layouts, but it should work around the issue.

If you have an example that breaks blueprints, please let me know what it is, specifically, or create a small test project that demonstrates it and get me a download link. I unfortunately can't give any kind of timeline on a fix for the bug, so I'd like to offer any alternate solutions as possible.

avatar image Kalle-H Nov 13 '15 at 01:11 PM

This same bug seems to affect us too. Nice to see it has adressed in formal issue already. https://answers.unrealengine.com/questions/331859/blueprint-use-wrong-values-at-construction-script.html

avatar image ColdIronPoz Nov 25 '15 at 08:21 PM

We have the same issue, which extends to the location of components that are changed on an instance. For example, if the construction script does a GetRelativeLocation on a component, it always gets the default location of that component and not the current location for that instance.

avatar image Kalle-H Jan 08 '16 at 11:11 AM

Just tested with 4.11 preview and bug is still happening. Do you have any updates on this?

avatar image Ben Halliday STAFF Jan 08 '16 at 06:18 PM

Apologies; we do not have any updates at this time.

avatar image kLy Jan 28 '16 at 08:58 AM

Been waiting for a fix for this bug for quite a few versions now. Sad to see that it keeps getting overlooked :(

avatar image Roel Jul 18 '16 at 10:40 AM

Still happening in 4.12.5. Happens with both CPP and Blueprint exposed variables. It makes the construction script kind of useless for a component based workflow. I now set everything in BeginPlay, which is annoying since there is no feedback during edit mode.

avatar image Roel Jul 18 '16 at 10:55 AM

I quickly made this debug project with an array, bool and float in both c++ and blueprint. They print the variables in the construction script. So just move the orange sphere around and watch the log to see they all do not work.

4.12.5 project for debugging issue (UE-21838)

debugproject.zip (447.1 kB)
avatar image Sean L ♦♦ STAFF Jul 18 '16 at 02:42 PM

This issue is still being investigated by our developers; however, there is currently no timeline for when a fix will be released.

Have a great day

avatar image Lightheart Dec 28 '16 at 08:13 PM

This remains a bug in 4.12.5. The behavior I've noticed through C++ is that the component's constructors are being called after the PostEditChangedProperty function is called, essentially throwing out the component you make a change on and replacing it with the default component, at least for the purposes of objects for display in the editor.

avatar image Sean L ♦♦ STAFF Dec 29 '16 at 01:40 PM

Hey Lightheart,

Here's a link to the issue on the public tracker so you can keep an eye on its status: https://issues.unrealengine.com/issue/UE-21838

avatar image Todd.Vance Aug 11 '17 at 09:50 PM

I'll point out, it's still an issue in 4.17.0.

avatar image Heerlo Nov 04 '17 at 09:59 PM

Still a problem in 4.18 too :(

avatar image Sean L ♦♦ STAFF Nov 08 '17 at 08:28 PM

Thanks for the updates, the issue is still being tracked in our database. I will update the ticket to reflect the fact that it's still occurring.

avatar image jbl2kz Dec 13 '17 at 12:25 PM

A little surprised a bug of this magnitude has been known and unresolved for over a year...

We'll have to work around it I guess

Edit: silly me. TWO years.

Created Oct 6, 2015 Updated Nov 8, 2017

avatar image EstherZuidgeest Feb 22 '18 at 10:51 AM

This is still not fixed?! How can something so vital not be working o.O? Can you please chase this up?

avatar image SomeDude12 Mar 12 '18 at 07:34 PM

4.18.3 Still a problem.....

avatar image Jekteir Apr 01 '18 at 07:25 PM

Guys, this is a major problem, come on! It's still occurring in 4.19.

avatar image MonolithCode May 29 '18 at 03:57 AM

I encountered this issue with some floats that were being set in the editor and used for computations in the construction script. It seems like an easy workaround, at least in my case, is just to force a recompile by moving the actor in the level. It will only rebuild once, and has the correct value. Engine version 4.19.1 in my case.

avatar image joel.m3c Sep 14 '18 at 03:13 AM

4.20.2, still happening.

avatar image Krzysiek_TATE Apr 19 '19 at 07:57 AM

4.22.0 - still an issue.

It's almost 4 years now ! That's kinda Epic !

(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