unity float to int 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
//(int) casts float or int after it to an int
intVar = (int)var
//(float) casts float or int after it to an float
intVar = (float)var