Get Attached Actors Doesn't Run in Construction Script?

I’m trying to run some code in the construction script of a blueprint that manipulates all the actors attached to it. However, the array that the “Get Attached Actors” node returns is always empty.

Using the exact same code in the event graph executes as expected with the “Get Attached Actors” array getting populated with the attached actors.

Does the “Get Attached Actors” node not work when used in the construction script? If not, what is the best method for doing the equivalent?

hi Gary,

I have been struggeling with the same issue.
By the moment, I found that it works if the parent class is “Static Mesh Actor”, but it won’t work if the parent class is “Actor”.
So you can use any Static mesh to create a “Static Mesh Actor” and then click “hidden in game” in the static mesh, then it will work as an empty scene where you can start to add components.

Hope it helps,

If anyone stumbles upon it.

Making a CallInEditor BP Function - can workaround this too. Simply clicking it will then “properly” work.

Adding the function in the c-script still does not change it.

Still broken

Hello, this looks like some kind of limitation when running from ConstructionScript, here is a related issue:

So yes, making a CallInEditor function is a workaround, unfortunately not for me, but I can confirm that it works.

1 Like