I have a GUI system and it displays strings from different parameters, but I wanna add a max size for each string, so that for example when the string exceeds a certain amount of characters, it ends in “…” at that point where it crosses the max (for example). Is that possible? Here is the code I am using…thank you in advance!
void OnGUI()
{
int row = 0;
int rowHeight = 30;
foreach (KillFeedInfo k in KFI)
{
GUI.Label(new Rect(Screen.width - 300, 0 + row * rowHeight, 200, 200), k.Killer);
GUI.Label(new Rect(Screen.width - 200, 0 + row * rowHeight, 200, 200), "[" + k.Gun + "]");
GUI.Label(new Rect(Screen.width - 100, 0 + row * rowHeight, 200, 200), k.Killed);
row++;
}
}