Unable to get attached actors while in editor

Hi
I’m trying to get attached children and/or attach parent actor while in editor.

I have two simple functions that do this.
If I run them in construction script, I they don’t return anything.
But if I run them OnBeginPlay, I get the expected results.

See images below for clarity.
Is this a bug, or am I doing something wrong?
How can I get actor’s attach parent and children while in editor?

Thanks!


I’m guessing the world is built by spawning actors into it under the hood.
Attached actors need to spawn in at runtime and connect. Even Child actor components print string won’t work in the constructor phase.

TLDR They probably don’t exist in the construction phase (you cannot spawn actors there).

if you are trying to access stuff in the editor but not in play mode you need to use editor utility blueprints together with subsystem nodes.

There are various subsystems nodes depending of what you want to access in the editor, I think the scene one is Actor Subsystem if I recall well.

Hmmm, yeah seems the parent/child structure gets created after the construction script.

Kinda sucks, I just need to read a few variables from the attach parent, if there is one.

Guess I’ll have to find a workaround of some sort.
Editor utility blueprints and widgets are a whole new rabbit hole that’s out of scope at the moment.