Javascript String.toUpperCase() not available?

Is toUpperCase() for Javascript strings not available to Unity’s compiler? I’m trying to write a proximity-based chat, so I have the following code based off the Networking demo:

if (inputField == inputField.toUpperCase()) {
    nearbyPlayers = FindPlayersInProximity(maxChatProximity + 5.0);
}
else {
    nearbyPlayers = FindPlayersInProximity(maxChatProximity);
}

and I get the following compiler error:

Assets/Chat/Chat.js(101) error BCE0019: 'toUpperCase' is not a member of 'String'.

I did a search of the forums and couldn’t find any reference to any other problems like this, but I find it hard to believe that I’m the first person to use toUpperCase(), so if I’m doing something wrong, please let me know. Thanks!

No, but you can use .net’s .ToUpper(). Unity’s Javascript might be called Javascript but it’s not really. :wink:

–Eric

Indeed. You’ll find this page useful: