Very simple - Appending a space to GUILayout.Label (C#)

Hello everyone, I have a very simple question today.

GUILayout.Label(string, myStyle);
GUILayout.Label(" ");

This creates a label with a string, followed by a label that is a space. This should work:

GUILayout.Label(string + " ", myStyle);

But it doesn’t, even though:

GUILayout.Label(string + "anytext", myStyle);

Does work.

Can someone help me make that middle line work?

Use " " instead of " ". What do you mean, you can’t see any difference? :wink: The first one is obviously a non-breaking space, achieved by typing alt-space.

I just used them as separate lines:

//If there's something in this line, print it.
				if(line != null){
					GUILayout.Label (line, dialogueStyle);
					GUILayout.Label (" ");
				}

It works.