unity convert float to integer code example
Example 1: unity cast float to int
//(int) casts float or int after it to an int
intVar = (int)var
Example 2: unity cast int to float
//(float) casts float or int after it to an float
intVar = (float)var