Is there a way to convert a letter in a string to it’s unicode value in Unity’s JavaScript ?
e.g.
var uniString : int = Convert.ToInt("T");
Debug.Log( uniString.ToString() );
Is there a way to convert a letter in a string to it’s unicode value in Unity’s JavaScript ?
e.g.
var uniString : int = Convert.ToInt("T");
Debug.Log( uniString.ToString() );
I think this would do it:
var a = (int)("Hello"[0]);
EDIT Ugh that’s c# - didn’t read the question
var a : int = ("Hello"[0]);
If you want to actually use System.Convert, then the syntax is
var uniString : int = System.Convert.ToInt32("T"[0]);