The var keyword is used on Javascript, to declare variables with C# you simply state the type of it.
//Your code
var cw = (GameObject)Instantiate(envCrossSectionCCW.gameObject);
//My code
GameObject cw = GameObject.Instantiate(envCrossSectionCCW.gameObject,
positionVector,
rotationVector) as GameObject;
↧