GUIStyle.CalcSize Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIStyle
GUIStyle.CalcSize

function CalcSize (content : GUIContent) : Vector2

Parameters

NameDescription
content The content to calculate the size of.

Returns

Vector2 - The size of the content rendered with this style.

Description

Calculate the size of a some content if it is rendered with this style.

This function does not take wordwrapping into account. To do that, you need to determine the allocated width and then call CalcHeight to figure out the wordwrapped height.