- Home /
[SOLVED] Java Converters In Unity?
I am familiar with some other languages, such as Java, and was wondering... In Unity, is it possible to use the converters, such as %d and %f?
For example, in Java, it would have the variable...
String something = Nothing;
Along with the converter in the code...
System.out.printf ( "This Text Says %s", something);
Is This Possible In Unity's JS or C#?
If so, how?
Thanks in advance for any help,
-myjean17
Comment
Best Answer
Answer by Tseng · Dec 05, 2011 at 03:24 AM
string.Format("{0:D} {1:F2}, {2}", someInt, someFloat, someString);
Check Microsoft C# documentation
Answer by nastasache · Dec 04, 2011 at 11:26 PM
I am not sure why to use converters.
var something : String = "";
print("This Text Says " + something);
it's the simplest way.