I have the following Unity Visual Script triggered on a Start:
It looks at a child GameObject that uses Rect Transform and has a Text Mesh Pro component, and attempts to calculate the width of the text using the Get Size Delta of the Rect Transform.
Here's the odd thing: the attached script always returns a width of 0. I think that's because the script is triggered on Start, and by then maybe the anchors haven't been set yet. That's my theory at least, because if I run this exact same code on another event besides Start... the Size Delta returns appropriate data, and it always calculates the width properly.
I'm pretty sure I could set some sort of time-based delay, and I would get the proper results... but I'd like to understand the issue better and not just kludge it.
When exactly do anchor points get set? Is there a way I could call this code in such a way that it consistently generates a width that's non-zero?