[UE5.1] GetWorldScale from child component doesn't return the right scale in parent actor construction script ?

Hey there, it seems that we can’t get the real scale of a child scene component during parent actor construction script right ? is it a bug ?

In the screenshot below I’m trying to get the scale of the child component (a static mesh) named “Backdrop” when the construction script of his parent actor is run. The issue appears when I change the scale of the child component “Backdrop” into the level, bringing this value from 500 to 700. But it return always 500, from the CDO I guess.

The same node “GetWorldScale” works as expected and return 700 into a level sequence or a level blueprint.

Is this totally expected or does it go wrong ? Am I missing something ? If there is a workaround I would appreciate :slightly_smiling_face:

thx !

In the level

Yes but if you scale the child component directly and not the parent actor, what do you get ?

It still works

Sorry If I’m saying wrong, but try to set [1, 1, 1] for the parent actor (MyBP) and the child component (StaticMesh) into the blueprint, then set [2, 2, 2] for the child component (StaticMesh) into the level directly (not into the blueprint himself). Keep the parent actor at [1, 1, 1] into the level. You should get [1, 1, 1] whereas it’s not representing the real user modified state of the child component into the level.

If I set the component to 2, actor to 1. Then I get 2 from the print string, because the world size is 2.

Ah, hold on…

No, that doesn’t work.

I’d set it from a variable in the BP

scale

Yes you got the point, it required to change the child component scale into the level and have the rollback arrow that say “the current scale differs from the CDO”.

I would have hoped not to add a property just for the scale, it’s a bit ridiculous, everyone puts one everywhere, it complicates the understanding of blueprints especially if it’s just to work around a bug that hasn’t never been reported or corrected? There is something for it, it should work as expected right ?

You have to let of this stuff :slight_smile:

The way to get what you want from the engine is to work with what you have.

You can always report it as a bug, and probably, nothing will happen.

Yes you’re totally right, and I figured out that it has been reported not only for scale but for the whole map instance reference of the child during construction script. And it won’t be fixed. :cry:

Anyway thx a lot for your help !

1 Like