GUILayout label shows value twice when using .ToString() and a custom GUIStyle
var customLabelTotalValue : GUIStyle;
function OnGUI () {
var totalValue : int = 5;
GUILayout.BeginArea(Rect(0,0,Screen.width,Screen.height));
GUILayout.Label(totalValue.ToString(), customLabelTotalValue);
GUILayout.EndArea();
}
It doesn’t do it with normal text, just when using .ToString()
Any thoughts on how to prevent that from happening?