Quantcast
Channel: Answers by "Mortoc"
Viewing all articles
Browse latest Browse all 73

Answer by Mortoc

$
0
0
You can use the GUIStyle.CalcHeight function for this: http://docs.unity3d.com/Documentation/ScriptReference/GUIStyle.CalcHeight.html I'm assuming that the variable 'Answer' is your GUIStyle and 'answer1' is your string. You can figure out the different sizes of the typed in text something like this: float oneLineHeight = Answer.CalcHeight(new GUIContent(""), 500); float answerHeight = Answer.CalcHeight(new GUIContent(answer1), 500);

Viewing all articles
Browse latest Browse all 73

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>