Convert to int unity code example
Example 1: unity to integer
int.Parse("500");
Example 2: unity cast float to int
//(int) casts float or int after it to an int
intVar = (int)var
int.Parse("500");
//(int) casts float or int after it to an int
intVar = (int)var