hi guys, i just created a raycast script that opens a door when the hit collider hits the door. The script i made was done in java now the thing is that i now want to take this script and make the same thing in C sharp. But as soon as i tried that i came across a problem, basically in the update function in my java script i created a variable called :
now in C sharp if i try to make the same variable it wont work what is the correct way to put this right in C#
here are my scripts :
That was the Java script here is the C sharp :
So yea thats the scripts and thanks in advance :)
The way you need to declare that variable in C# is
No need for the var keyword in C#.
answered Apr 08 '11 at 12:26 PM