Construction script runs twice

Hi there, i’ve just noticed both in 4.12.3 and 4.13 that whenever i make a blank project and add a blueprint based on an actor, and add a Print String to construction Script and compile, it writes out “Hello” two times. Isn’t that a bug?

Reason i ask, is because if i put this actor in my level, it also runs twice and that basically means it’s run 4 times and on top of that im building something which generates some splinemeshes in the constructionscript, so as you can imagine, this ends up crippeling my performance when i move this actor around.

I hope it’s just me that did something.

ow, just did another test. It only seem to run twice when i compile it. Instances of that actor in my level also runs twice though, but moving it around, only fires it once. So i guess the problem is not that critical.

Interesting, but did you ever found out why this is and what is the purpose of this?

I do not understand the reason behind this. I would assume construction script is run ones. Also when one actor is in the level.

When I put a actor into the lvl and make a print string at the beginning of the construction script, the string is printed 3 times when compiling. Why is that? I would assume construction script is run ones for each actor in the level. I have only one of the actors in level. Also, I print out the actor name and if “is server”, but all is the same in all three construction skript runs.

So, do you understand why on compile construction script is running multiple times for the same actor?

1 Like

It happened to me when I made a Generated Dynamic Mesh Actor. Its starting event called: On Rebuild Generated Mesh.
If I add something to an array, it seems fine BUT when I randomly generate a number, and I add that to an array variable, it fires twice and causes an unsettling problem.
I tried to add Do Once after the On Rebuild Generated Mesh, and then the Apply Box function does not generate meshes, showing that the problem is with the Engine, and not with my script. I don’t know what causes it. Please anyone, help me solve this.