I tested wrote like this but error says,
Assets/Scripts/Linq1.js(15,25): UCE0001: ‘;’ expected. Insert a semicolon at the end.
import System.Collections.Generic;
import System.Linq;
function Start(){
test();
}
function test(){
var numbers : int[] = [1, 1, 2, 3, 3];
var number2 : int[] = [12,1212, -19, 68, 99, 100];
var distinct :int = Enumerable.Count(Enumerable.Distinct(numbers));
var numquery = from n in number2
where n <100
select n;
Debug.Log(distinct);
}
So why unityscript does not recognize [from, in, where, select] linq expression? whileas Enumerable.Count works well in unityscript.
Thanks.