{Solved} How do you put quotations just to symbol that a character is speaking?

I am trying to put text onto the players screen of someone saying something. Can anyone tell me how I could have a character saying “something like this?”. Mono won’t accept quotations in quotations. Cheers!

1 Like

I think that the right syntax would be a double quote such as:

Print (" ““something like this?”” ");

1 Like

I have used Johnny’s solution in Visual Basic before and it works a charm, nice and straight forward, you just double up on the quotes, of course, if there are a lot of them, you can eventually go blind by staring at all of the quotations on a white background whilst you try to count them to make sure you have enough at either end… price you pay if you want to write code :dizzy_face:

Alas, C# isn’t quite so happy with that…

You could do either of these;

string verbatimStringLiteral = @"I am a verbatim string literal, standard escape characters are ignored, apart from ""double quotes""";
Debug.Log(verbatimStringLiteral );

string regularStringLiteral = "\"You could escape the quotes using a backslash.\"";
Debug.Log(regularStringLiteral);


See also;

1 Like

Privacy & Terms