Formatting question from text file.

I’m trying to read in exponential values from a text file, such as 3 to the 3rd power; 3^3.

I’d like to be able to have the small superscript 3 at the upper right hand corner of the large 3, rather than the carrot 3, so it’s less confusing and easier to read.

I’m storing the information being read from in text files.

If anyone knows how I would go about doing this, let me know. I’ll continue doing my research elsewhere in the meantime as well.

You could store the superscripts in a string, and use that as a char array to get the appropriate character:

private var superscripts = " ¹²³⁴⁵⁶⁷⁸⁹";

function Start () {
	Debug.Log ("3" + superscripts[3]);

That requires saving the script using Unicode, and also a font that uses Unicode characters. (I padded the string with an initial space, so that the array index corresponds to the superscript character.)