In Unreal Engine, scale is always applied in the local space to avoid any skew. This means that if you have a component which has a 90 degree rotation and is scaled, or any of its children are scaled then the scale axes will not be applied as you would expect. This is can make it very awkward to work with when trying to scale the actors to fit within the scene volumes. To work around this problem, this function will attempt to adjust the scale axes recursively to match the expected behaviour. This will only work reliably if the rotations involved are 90 degrees, if they are not then it will pick the closest axis.
Parameters
SceneComponent
The component where the scale should be set
UnRotatedScale
The scale you would like to have without considering any rotations