Scripting API

String

Descripción

Representa texto como una serie de caracteres Unicode.

Unity uses the .Net System.String class for strings. See the Microsoft MSDN
documentation for Strings
for more details.

Note: In c# string is an alias for System.String. This means that you
can use either string or String in your code (if you have added using System
to the top of your script.)
Note: In Javascript strings are represented using String which you should use
in your Unity script code.
Here are some basic uses of the String class.

// Iterate over all the methods from the System.String class and display
// return type and parameters.
// This reveals all the things you can do with a String.
foreach (MethodInfo mi in t.GetMethods())
{
System.String s = System.String.Format("{0} {1} (", mi.ReturnType, mi.Name);
ParameterInfo[] pars = mi.GetParameters();