A couple of the basic types are spelt differently in pure Unity C#. In JavaScript, we use Boolean
and String
, but in pure Unity C#, we use bool
and string
.
JavaScript:
var isHit : Boolean; var myName : String;
C#:
bool isHit; string myName;
However, there is an exception. If you include System
in your C# script, you will be able to use String
and Boolean
classes (the upper-case) of .NET, similar to the following script:
C#:
using System;
Boolean isHit;
String myName;
3.21.98.207