I just came across a quite strange issue which is not logical to me at all.
if (true) {
var duplicate : int = 0;
}
else if (false) {
var duplicate : int = 0;
}
That code throws an error in Unity, “There is already a local variable with the name ‘duplicate’”.
Are the variable scopes in JavaScript different than in C#?
If yes, I would really be surprised