Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# unity get lines

//Gameobject has to be active (Displayed)
//otherwise it will return the value from the last active frame (0)!
Canvas.ForceUpdateCanvases();
[Your Text Compontent].cachedTextGenerator.lineCount;
 
PREVIOUS NEXT
Tagged: #unity #lines
ADD COMMENT
Topic
Name
4+5 =