Important: How do I get the width of text in pixels of a UILabel's current text?

I saw a post saying something like:

GUIStyle is for normal font tho, not imGUI

GUIStyle myStyle = new GUIStyle();
myStyle.fontStyle = GTicker.GetComponent().fontStyle;
myStyle.fontSize = GTicker.GetComponent().fontSize;
myStyle.font= GTicker.GetComponent().font);//This line doesn’t work with Imgui

Vector2 size = myStyle.CalcSize(new GUIContent(GTicker.GetComponent().text));

If I know the width of text, I can have images follow them along on a ticker tape.

There is some component called imguistyle, but it won’t populate. Does it need an include?