Cached font best fit size is always 131? Help?

Hi, I’m having a problem getting the font size used in a text panel.

I am trying to set the font size of a text panel to the font size used in the best fit size of another text panel.
The first panel has rolling text and I have a second panel off-screen that is set to best fit.

ui.bestFitSize.text = data.text;
print (ui.bestFitSize.cachedTextGenerator.fontSizeUsedForBestFit);
ui.dialogueText.fontSize = ui.bestFitSize.cachedTextGenerator.fontSizeUsedForBestFit;

StartCoroutine(WriteText(data.text));

No matter how much text is in the panel the best fit size is always output as 131, even though the actual panel is fit correctly.

I’ve figured out the problem, the cachedTextGenerator doesn’t update in the same frame, so I had to add modify my rolling text coroutine to include a yield for end of frame and then set the font size.

Hi, show me the implementation