O'Reilly logo

Unity 3 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Character literals not supported

Unity's JavaScript seems to be missing the syntax to declare character literals. This means you need to get them implicitly by referencing a character index from a string.

JavaScript:

var myChar = "a"[0];      // implicitly retrieves the first character of the string "a"

C#:

char myChar = 'a';        // character 'a'

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required