unity3d.comunity c# float.ToInt code example Example: unity cast float to int //(int) casts float or int after it to an int intVar = (int)var