"Orphans" prevention system for Unreal RichTextBlock component

I just found the variable I’m looking for (LineViews). Shoutouts to this great article

Unfortunatelly, is private on several levels, and since I don’t know how to work around that without modificating the source code, which is not an option, I’ll have to compute the value myself.

The path to get to the variable from the “TextBlock” is the following, for anywone willing to modify the engine:

For TextBlock:

TextBlock->MyTextBlock->TextLayoutCache->TextLayout->LineViews

For RichTextBlock:

RichTextBlock->MyRichTextBlock->TextLayoutCache->TextLayout->LineViews